This workflow corresponds to n8n.io template #7366 — we link there as the canonical source.
This workflow follows the Form Trigger → Google Sheets recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"nodes": [
{
"id": "2b931767-0890-44bd-bd6e-0520d2d30d19",
"name": "On form submission",
"type": "n8n-nodes-base.formTrigger",
"position": [
-800,
300
],
"parameters": {
"options": {},
"formTitle": "OnPage SEO ( Keyword)",
"formFields": {
"values": [
{
"fieldLabel": "keyword",
"requiredField": true
},
{
"fieldLabel": "country",
"requiredField": true
}
]
},
"formDescription": "OnPage SEO ( Keyword)"
},
"typeVersion": 2.2
},
{
"id": "6744f81f-3a81-4602-b6ce-24a47aefcf0d",
"name": "Global Storage",
"type": "n8n-nodes-base.set",
"position": [
-480,
300
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "10714a4e-2be6-4167-aef5-afe30eebdc2b",
"name": "keyword",
"type": "string",
"value": "={{ $json.keyword }}"
},
{
"id": "6d160d8b-ab11-4f0a-a484-2e3f8f7f3033",
"name": "country",
"type": "string",
"value": "={{ $json.country }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "bcc6356f-69b7-48cb-8901-2155a7a354d8",
"name": "Re-Format",
"type": "n8n-nodes-base.code",
"position": [
200,
20
],
"parameters": {
"jsCode": "\nreturn $input.first().json.data.semrushAPI.broadMatchKeywords;"
},
"typeVersion": 2
},
{
"id": "880567fc-0355-4e2d-907b-91138a74600b",
"name": "Re-Format 2",
"type": "n8n-nodes-base.code",
"position": [
240,
360
],
"parameters": {
"jsCode": "return $input.first().json.data.semrushAPI.keywordDifficulty[0];"
},
"typeVersion": 2
},
{
"id": "21b7e79e-d94d-4dad-b40f-8c78eadf5958",
"name": "Re -Format 5",
"type": "n8n-nodes-base.code",
"position": [
260,
700
],
"parameters": {
"jsCode": "return $input.first().json.data.semrushAPI.serpResults;"
},
"typeVersion": 2
},
{
"id": "5d57d994-d970-4670-8868-18875f16890d",
"name": "Keyword Insights ",
"type": "n8n-nodes-base.googleSheets",
"position": [
500,
20
],
"parameters": {
"columns": {
"value": {},
"schema": [],
"mappingMode": "autoMapInputData",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "",
"cachedResultName": "Keyword Insights"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1dCSO-gv_mPD3O0QACeJaBFtjYGqtF-iF2_6iCuvm_Xw",
"cachedResultUrl": "",
"cachedResultName": "Website onPage ( Keyword)"
},
"authentication": "serviceAccount"
},
"credentials": {
"googleApi": {
"name": "<your credential>"
}
},
"typeVersion": 4.6
},
{
"id": "c2f0a816-6ba0-48b2-a764-dc19203aa3ed",
"name": "Keyword Insights Request ",
"type": "n8n-nodes-base.httpRequest",
"position": [
-140,
20
],
"parameters": {
"url": "https://seo-on-page.p.rapidapi.com/keyword-tool.php",
"method": "POST",
"options": {},
"sendBody": true,
"contentType": "multipart-form-data",
"sendHeaders": true,
"bodyParameters": {
"parameters": [
{
"name": "keyword",
"value": "={{ $json.keyword }}"
},
{
"name": "country",
"value": "={{ $json.country }}"
}
]
},
"headerParameters": {
"parameters": [
{
"name": "x-rapidapi-host",
"value": "seo-on-page.p.rapidapi.com"
},
{
"name": "x-rapidapi-key",
"value": "your key"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "5e918cef-3e92-4085-902c-19c1c56e0a4e",
"name": "KeyWord Difficulty Request",
"type": "n8n-nodes-base.httpRequest",
"position": [
-20,
380
],
"parameters": {
"url": "https://seo-on-page.p.rapidapi.com/keywordDifficulty.php",
"method": "POST",
"options": {},
"sendBody": true,
"contentType": "multipart-form-data",
"sendHeaders": true,
"bodyParameters": {
"parameters": [
{
"name": "keyword",
"value": "={{ $json.keyword }}"
},
{
"name": "country",
"value": "={{ $json.country }}"
}
]
},
"headerParameters": {
"parameters": [
{
"name": "x-rapidapi-host",
"value": "=seo-on-page.p.rapidapi.com"
},
{
"name": "x-rapidapi-key",
"value": "your key"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "aed9c3bf-f81e-423a-a176-ef5a97e9ee05",
"name": "KeyWord Difficulty",
"type": "n8n-nodes-base.googleSheets",
"position": [
560,
340
],
"parameters": {
"columns": {
"value": {},
"schema": [
{
"id": "keyword",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "keyword",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "keywordDifficultyIndex",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "keywordDifficultyIndex",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "autoMapInputData",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": 1445611850,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1dCSO-gv_mPD3O0QACeJaBFtjYGqtF-iF2_6iCuvm_Xw/edit#gid=1445611850",
"cachedResultName": "KeyWord Difficulty"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1dCSO-gv_mPD3O0QACeJaBFtjYGqtF-iF2_6iCuvm_Xw",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1dCSO-gv_mPD3O0QACeJaBFtjYGqtF-iF2_6iCuvm_Xw/edit?usp=drivesdk",
"cachedResultName": "Website onPage ( Keyword)"
},
"authentication": "serviceAccount"
},
"credentials": {
"googleApi": {
"name": "<your credential>"
}
},
"typeVersion": 4.6
},
{
"id": "95fabfa0-c82a-450f-a48e-a3eee77e7c82",
"name": "SERP Result",
"type": "n8n-nodes-base.googleSheets",
"position": [
660,
700
],
"parameters": {
"columns": {
"value": {},
"schema": [],
"mappingMode": "autoMapInputData",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": 684053301,
"cachedResultUrl": "",
"cachedResultName": "Serp Analytics"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1dCSO-gv_mPD3O0QACeJaBFtjYGqtF-iF2_6iCuvm_Xw",
"cachedResultUrl": "",
"cachedResultName": "Website onPage ( Keyword)"
},
"authentication": "serviceAccount"
},
"credentials": {
"googleApi": {
"name": "<your credential>"
}
},
"typeVersion": 4.6
},
{
"id": "d1d45c51-227d-425d-97f5-7fd0d32ad593",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2100,
-200
],
"parameters": {
"width": 960,
"height": 1220,
"content": "# \ud83d\udcca OnPage SEO (Keyword) - n8n Workflow\n\n## \ud83d\udcdd Description\nThis workflow automates keyword analysis for on-page SEO using form input (keyword and country), fetches keyword data from an API (including keyword insights, difficulty, and SERP data), and saves results into a Google Sheet.\n\n---\n\n## \ud83d\udd27 Node-by-Node Overview\n\n### 1. **On form submission**\nTriggers when a form is submitted with required inputs: `keyword` and `country`.\n\n### 2. **Global Storage**\nStores the form inputs (`keyword`, `country`) into the workflow context for further use.\n\n### 3. **Keyword Insights Request**\nSends a POST request to the SEO API (`keyword-tool.php`) to fetch keyword data such as broad match keywords.\n\n### 4. **KeyWord Difficulty Request**\nSends a POST request to the SEO API (`keywordDifficulty.php`) to retrieve keyword difficulty and SERP results.\n\n### 5. **Re-Format**\nParses and extracts `broadMatchKeywords` from the keyword insights API response.\n\n### 6. **Re-Format 2**\nParses and extracts the `keywordDifficultyIndex` from the difficulty API response.\n\n### 7. **Re -Format 5**\nParses and extracts `serpResults` from the difficulty API response.\n\n### 8. **Keyword Insights**\nAppends the extracted keyword insights into the **\"Keyword Insights\"** sheet in the connected Google Sheet.\n\n### 9. **KeyWord Difficulty**\nAppends keyword and difficulty index data into the **\"KeyWord Difficulty\"** sheet in the connected Google Sheet.\n\n### 10. **SERP Result**\nAppends extracted SERP data into the **\"Serp Analytics\"** sheet in the connected Google Sheet.\n\n---\n\n"
},
"typeVersion": 1
},
{
"id": "e4815a76-56c1-4866-a6c0-1a6cea997e98",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-880,
140
],
"parameters": {
"height": 320,
"content": "### 1. \ud83d\udfe2 **On form submission**\n**Type:** `formTrigger` \n**Description:** Triggers when a user submits the form with `keyword` and `country` fields.\n"
},
"typeVersion": 1
},
{
"id": "4f9f580f-57ca-4b18-a2fa-09f3fab03451",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-560,
140
],
"parameters": {
"height": 320,
"content": "### 2. \ud83d\udce6 **Global Storage**\n**Type:** `set` \n**Description:** Stores the keyword and country values from the form for use in later nodes.\n"
},
"typeVersion": 1
},
{
"id": "ec770ca7-219c-4eb4-b677-10c7605d38bd",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-220,
-160
],
"parameters": {
"height": 320,
"content": "### 3. \ud83c\udf10 **Keyword Insights Request**\n**Type:** `httpRequest` \n**Description:** Sends a POST request to the RapidAPI SEO endpoint (`keyword-tool.php`) to get broad match keyword insights.\n"
},
"typeVersion": 1
},
{
"id": "1df871f7-f75d-424e-b011-6f58b4ad5e1d",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-80,
180
],
"parameters": {
"height": 340,
"content": "### 4. \ud83c\udf10 **KeyWord Difficulty Request**\n**Type:** `httpRequest` \n**Description:** Sends a POST request to the RapidAPI SEO endpoint (`keywordDifficulty.php`) to get keyword difficulty and SERP data.\n"
},
"typeVersion": 1
},
{
"id": "a168caf8-73e2-405c-8588-88939bf50038",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
160,
-180
],
"parameters": {
"height": 340,
"content": "### 5. \ud83e\uddfe **Re-Format**\n**Type:** `code` \n**Description:** Extracts the `broadMatchKeywords` array from the `keyword-tool` API response.\n"
},
"typeVersion": 1
},
{
"id": "51e19d07-9e11-46d9-9018-f473b1d1f4e5",
"name": "Sticky Note6",
"type": "n8n-nodes-base.stickyNote",
"position": [
460,
-160
],
"parameters": {
"height": 320,
"content": "### 6. \ud83d\udcca **Keyword Insights**\n**Type:** `googleSheets` \n**Description:** Appends the extracted broad match keyword data to the **\"Keyword Insights\"** sheet in Google Sheets."
},
"typeVersion": 1
},
{
"id": "dd43562a-5946-4491-8761-5700cdb1d8fc",
"name": "Sticky Note7",
"type": "n8n-nodes-base.stickyNote",
"position": [
200,
200
],
"parameters": {
"height": 300,
"content": "### 7. \ud83e\uddee **Re-Format 2**\n**Type:** `code` \n**Description:** Extracts the `keywordDifficultyIndex` from the `keywordDifficulty` API response.\n"
},
"typeVersion": 1
},
{
"id": "f823bb2d-3042-4717-8421-a42c914f5fd0",
"name": "Sticky Note8",
"type": "n8n-nodes-base.stickyNote",
"position": [
500,
200
],
"parameters": {
"height": 300,
"content": "### 8. \ud83d\udcc8 **KeyWord Difficulty**\n**Type:** `googleSheets` \n**Description:** Appends the keyword and difficulty index to the **\"KeyWord Difficulty\"** sheet.\n"
},
"typeVersion": 1
},
{
"id": "303561c4-182f-4950-ba17-544cb633b2e6",
"name": "Sticky Note9",
"type": "n8n-nodes-base.stickyNote",
"position": [
200,
540
],
"parameters": {
"height": 320,
"content": "### 9. \ud83d\uddc2\ufe0f **Re -Format 5**\n**Type:** `code` \n**Description:** Extracts the `serpResults` data from the `keywordDifficulty` API response.\n"
},
"typeVersion": 1
},
{
"id": "29647f1c-1cac-4ccc-bb55-7df969e9d3ed",
"name": "Sticky Note10",
"type": "n8n-nodes-base.stickyNote",
"position": [
580,
560
],
"parameters": {
"height": 280,
"content": "### 10. \ud83d\udd0d **SERP Result**\n**Type:** `googleSheets` \n**Description:** Appends the extracted SERP analytics data to the **\"Serp Analytics\"** sheet.\n"
},
"typeVersion": 1
}
],
"connections": {
"Re-Format": {
"main": [
[
{
"node": "Keyword Insights ",
"type": "main",
"index": 0
}
]
]
},
"Re-Format 2": {
"main": [
[
{
"node": "KeyWord Difficulty",
"type": "main",
"index": 0
}
]
]
},
"Re -Format 5": {
"main": [
[
{
"node": "SERP Result",
"type": "main",
"index": 0
}
]
]
},
"Global Storage": {
"main": [
[
{
"node": "Keyword Insights Request ",
"type": "main",
"index": 0
},
{
"node": "KeyWord Difficulty Request",
"type": "main",
"index": 0
}
]
]
},
"On form submission": {
"main": [
[
{
"node": "Global Storage",
"type": "main",
"index": 0
}
]
]
},
"Keyword Insights Request ": {
"main": [
[
{
"node": "Re-Format",
"type": "main",
"index": 0
}
]
]
},
"KeyWord Difficulty Request": {
"main": [
[
{
"node": "Re-Format 2",
"type": "main",
"index": 0
},
{
"node": "Re -Format 5",
"type": "main",
"index": 0
}
]
]
}
}
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
googleApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Boost your SEO strategy by automating keyword research and on-page SEO analysis with n8n. This workflow uses user input (keyword + country), retrieves essential data using the powerful SEO On-Page API, and saves it directly into Google Sheets. Ideal for marketers, content…
Source: https://n8n.io/workflows/7366/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
Overview 🌐
Splitout Code. Uses splitOut, httpRequest, googleSheets, stickyNote. Event-driven trigger; 36 nodes.
This n8n workflow is designed for Customer Success Managers (CSM), marketers, sales teams, and data administrators who need to automate the process of uploading and processing CSV data in HubSpot. It
The SEO On Page API is a powerful tool for keyword research, competitor analysis, backlink insights, and overall SEO optimization. With multiple endpoints, you can instantly gather actionable SEO data
Demonstration video