Category: Automations › SEO, Analytics & Reporting · Best for: SEO and content planners · Platform: n8n · Steps: 6
What it does
Get keyword ideas and how many people search for each one.
Generate new keywords for SEO with the monthly Search volumes
Works with: Google Sheets
What you get
- The n8n workflow file (
workflow.json), ready to import - This setup guide
- The list of fields to change for your own accounts (see Install below)
- Email support if you get stuck
Before you start
-
An n8n account. Easiest: n8n Cloud (free trial). Self-host for free with Docker:
docker run -it --rm -p 5678:5678 -v n8n_data:/home/node/.n8n docker.n8n.io/n8nio/n8n, then open http://localhost:5678. -
Accounts and API keys for these services:
- Google (Sheets, Gmail, Drive, Calendar, Docs): how to connect (used by Generate new keywords, Upsert)
Install
- In n8n, click Create workflow (top right).
- Click the ⋯ menu → Import from file and choose
workflow.json. Or open the file, copy everything and paste it onto the empty canvas with Ctrl/Cmd + V. - Open each node with a red warning triangle and pick or create the matching credential from the list above.
- Point these fields at your own sheets, chats and accounts:
- Upsert →
sheetName: choose your own - Upsert →
documentId: choose your own
- Upsert →
- Click Save.
Test it
- Click Test workflow (or Execute workflow). Trigger starts it. Trigger it once with real sample data.
- Click each node to check its output. A green tick means the step worked.
- Fix any red node: it's almost always a credential or a field that still points at a sheet or chat that isn't yours.
Go live
Toggle Active (top right). From now on it runs on its own. Check Executions in the left sidebar to see every run.
How it works, step by step
- Trigger starts the workflow (Execute Workflow).
- Set Keywords reshapes the data for the next step.
- Generate new keywords calls an external API (https://googleads.googleapis.com/v18/customers/{customer-id}).
- Split Out uses Split Out.
- Edit Fields reshapes the data for the next step.
- Upsert uses Google Sheets to append.
Extra setup notes
These notes are also on the canvas as yellow sticky notes:
Generate new keywords for SEO with the monthly Search volumes
This workflow is an improvement on the workflows below. It can be used to generate new keywords that you can use for your SEO campaigns or Google ads campaigns
Generate SEO Keyword Search Volume Data using Google API and Generating Keywords using Google Autosuggest
Usage
- Send the keywords you need as an array to this workflow
- Pin the data and map it to the
set Keywordsnode - Map the keywords to the Google ads API with the location and Language of your choice
- Split the results and set them data
- Pass this to the next nodes as needed for storage
- Make a copy of this spreedsheet and update the data accordingly
Having challenges with the google Ads API? Read this blog
Setup
-
Replace the trigger with your desired trigger eg a webhook or manual trigger
-
Map the data correctly to the
set Keywordsnode -
On the
Generate new keywords, Update the{customer_id} on the url and login-customer-id with your actual one. Update thedeveloper-token` also with your values.
The url should be corrected as below https://googleads.googleapis.com/v18/customers/{customer-id}:generateKeywordIdeas
You should send the headers as below
{
"name": "content-type",
"value": "application/json"
},
{
"name": "developer-token",
"value": "{developer-token}"
},
{
"name": "login-customer-id",
"value": "{login-customer-id}"
}
and the json body should take the following format
{
"geoTargetConstants": ["geoTargetConstants/2840"],
"includeAdultKeywords": false,
"pageToken": "",
"pageSize": 2,
"keywordPlanNetwork": "GOOGLE_SEARCH",
"language": "languageConstants/1000",
"keywordSeed": {
"keywords": {{ $json.Keyword }}
}
}
Troubleshooting
-
If you get an error with the workflow, check the credentials you are using
-
Check the account you are using eg the right customer id and developer token
-
Follow the guide on the blog to set up your Google ads account
Generate new keywords and split the data out to set only the keyword and average monthly search
Set up a new trigger and map the data with a column name as keyword
Troubleshooting
- "Credentials not found": open the node and select your credential again.
- Google "access blocked": in Google Cloud, add your email as a test user on the OAuth consent screen.
- Webhook not firing: copy the node's Production URL (not Test URL) into the other app, and make sure the workflow is Active.
- AI node errors: check your API key has billing enabled and the model name exists on your plan.
- Nothing happens on schedule: the workflow must be Active, and self-hosted n8n must stay running.
Need help?
Reply to your Morning Method order email and we'll help you get it running.
© Morning Method