Five hundred keywords grouped into topics with Gemini
The struggle: You export 500 keywords, and sorting them into topics by hand takes a full day you do not have.
What you end up with: A Sheet with each keyword assigned to a topic, spot-checked, and a count per topic.
Use the AI function in Sheets to label keywords in batches, then a pivot table to count them. You spot-check the groups before building a content plan.
Tools: Gemini. Level: Pro. Time: 1 hour.
Use it if
- You have a keyword export from an SEO tool
- You need topic groups to plan pages or posts
- The list is too long to sort by eye
Skip it if
- You need exact search volumes or rankings, because Gemini cannot supply them
- Your list holds fewer than 40 keywords, where sorting by hand is quicker
What you need first
- Gemini in Sheets with the AI function (an eligible Google Workspace or Google AI plan)
- Your keyword export in a Google Sheet, one keyword per row, with a copy to work on
The method
Look at a sample and set the topic list (Gemini: Google Sheets)
Copy the sheet. Read 40 keywords, then write 6 to 10 topic names you expect. In Ask Gemini ask it to propose a topic list from the sample, and then edit the list yourself.
Prompt to copy:
Here is a sample of keywords: [paste 40]. Propose 6 to 10 topic names that cover them, each with a one-line definition and 2 example keywords. Add an 'other' group for keywords that do not fit. If two topics overlap, say how to tell them apart.
You get: A fixed list of topics.
Tip: Fix the list of topics before labelling. Free-form labels give 80 slightly different names for one topic.
Label the keywords in batches (Gemini: AI function)
In the cell next to the first keyword, enter the AI function with a prompt that lists your topic list and refers to the keyword cell. Choose Generate and Insert. Work in batches: the help page limits the first 350 selected AI cells per selection, so label rows in chunks and repeat for the rest.
Prompt to copy:
=AI("Assign this keyword to exactly one of these topics: [topic 1], [topic 2], [topic 3], other. Answer with the topic name only. Keyword:", A2)
You get: A topic label next to each keyword.
Tip: Use the range argument. The function only sees cells you refer to.
Spot-check the groups (Gemini: Google Sheets)
Filter by topic and read 15 keywords in each group. Move wrong ones by hand. If a topic is wrong often, edit the topic list and rerun just that group. Check the other group for patterns.
Prompt to copy:
In this sheet, show the topic column's list of distinct values and how many keywords each has. List any topic name that appears only once or twice, which may be a typo or a stray label.
You get: Topic labels you have checked.
Tip: Sort the other group alphabetically; a missing topic usually shows up there.
Count by topic with a pivot table (Gemini: Ask Gemini)
Ask Gemini in Sheets for a pivot table with topic as rows and the count of keywords as values. Add the volume column only if your export has it. Then decide which topics deserve a page.
Prompt to copy:
Create a pivot table on a new tab: rows = topic column, values = count of keywords. Sort by count, largest first. Then give the total and confirm it matches the number of keyword rows.
You get: A pivot table counting keywords per topic.
Tip: Check that the counts add up to the total number of keywords.
Where this goes wrong
- Labels are guesses by a model, not search intent data; spot-check every group before using it
- The help page limits AI function runs to the first 350 selected cells per selection, so label in batches and check no cell is blank
- AI function answers are text only and cannot be undone, so work on a copy
- Topic groups say nothing about rankings, traffic or how many people search; make no such claim from this Sheet
Sources
More like this
- Write a Google Business Profile that wins local customers
- Find why your landing page gets no enquiries
- Find your customer's exact words in reviews
Updated . Written with AI help and checked by an independent review step, as described in our editorial standards.