<p>This is how I did it: <a href="https://craftquest.io/lessons/populating-nested-categories-from-a-google-sheet" rel="nofollow noreferrer">https://craftquest.io/lessons/populating-nested-categories-from-a-google-sheet</a> (free video)</p>
<p>I structured the spreadsheet so it has a flat list of all of the categories in the first column and their parent (if there is one) in the second column.</p>
<p>On the import, you want are importing the first column (all categories) and then set the parent at the same time with the data in the right column. Because the parent category is listed first, it already is there.</p>

CC BY-SA 4.0
2022-03-01T09:58:58.797Z
Thanks a lot ! I'll try that this afternoon, but it's looks perfect for my situation.
Elodie Grondin
CC BY-SA 4.0
2022-02-28T16:15:25.800Z
2022-02-28T16:15:25.800Z
CraftQuest
<p>You would need to either create the categories and their structure first, or import them and arrange them into their structure later.</p>

CC BY-SA 4.0
2022-03-02T11:05:03.740Z
Yes, import the categories first was the good call in my case. Thanks for your answer.
Elodie Grondin
CC BY-SA 4.0
2022-02-28T15:57:55.240Z
2022-02-28T15:57:55.240Z
foamcow
<p>I'm currently able to import nested categories from a Google Sheets when they already exist.</p>
<p>But when a child category does not exist, the category is created at the first level. It's quite logic because we don't know which level has that new category.</p>
<p>So I was wondering if there's a way to specify the level/parent of the category in the csv ? Or if the easiest solution is to import the categories before the entries ?</p>
<p>Thanks !</p>

<craft3><categories><plugin-feedme>
Feed-me import nested categories from CSV/Google sheets
# Feed-me import nested categories from CSV/Google sheets

(Asked by: username_0 on 2022-02-28)

I'm currently able to import nested categories from a Google Sheets when they already exist.

But when a child category does not exist, the category is created at the first level. It's quite logic because we don't know which level has that new category.

So I was wondering if there's a way to specify the level/parent of the category in the csv ? Or if the easiest solution is to import the categories before the entries ?

Thanks !

**Tags:** craft3, categories, plugin-feedme

---

## 2 answers

### Answer by username_1 on 2022-02-28. Score: 3 | Accepted answer

This is how I did it: <https://craftquest.io/lessons/populating-nested-categories-from-a-google-sheet> (free video)

I structured the spreadsheet so it has a flat list of all of the categories in the first column and their parent (if there is one) in the second column.

On the import, you want are importing the first column (all categories) and then set the parent at the same time with the data in the right column. Because the parent category is listed first, it already is there.

> **Comments:**
> **username_0**: Thanks a lot ! I'll try that this afternoon, but it's looks perfect for my situation.  

---

### Answer by username_2 on 2022-02-28. Score: 0

You would need to either create the categories and their structure first, or import them and arrange them into their structure later.

> **Comments:**
> **username_0**: Yes, import the categories first was the good call in my case. Thanks for your answer.  

---

