Automated SEO Keyword Analysis and Google Sheets Reporting - n8n Workflow

Use this robust n8n workflow to automate SEO keyword analysis, fetch difficulty and SERP data via RapidAPI, and instantly log comprehensive keyword research results to Google Sheets tabs.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • SEO specialists needing streamlined, instant keyword research reports.

  • Content managers who require quick data collection for content planning.

  • Users looking for a ready-to-use n8n template for integrating external APIs (like RapidAPI) with Google Sheets.

  • Agencies seeking to standardize their keyword analysis reporting process using n8n.

Overview

Manual keyword research is time-consuming and often fragmented across multiple tools. This efficient n8n workflow solves this by providing a single point of entry—an n8n form trigger—to execute complex, multi-faceted SEO data retrieval.

This powerful n8n workflow is designed for professionals who need rapid, standardized data collection. The n8n automation accepts a keyword and country, executes multiple requests to a third-party SEO API (RapidAPI) simultaneously for comprehensive data (broad match insights, difficulty, and SERP ranking results), and uses custom JavaScript within an n8n node to perfectly parse the responses. Finally, the results are meticulously logged into three separate tabs within a designated Google Sheets file. This seamless integration ensures accurate data capture every time, making this n8n template an invaluable asset for technical SEO reporting.

How it Works

The entire process begins with the 'On form submission' n8n trigger. This is a basic form that collects the target keyword and country from the user.


  1. Data Initialization: The submitted data immediately passes to the 'Global Storage' n8n node (a Set node), which establishes the keyword and country variables for global use throughout the n8n workflow.

  2. Parallel API Requests: The n8n workflow branches into two parallel HTTP Request paths, utilizing the stored variables to query the SEO RapidAPI endpoint. One request fetches 'Keyword Insights,' while the other fetches 'KeyWord Difficulty.'

  3. Data Refinement (Code Nodes): Since the API responses are complex, three separate Code n8n nodes ('Re-Format', 'Re-Format 2', 'Re -Format 5') are used downstream to extract specific JSON arrays (broad match keywords, difficulty index, and SERP results).

  4. Structured Reporting: The refined data flows into three distinct Google Sheets n8n node actions:

- 'Keyword Insights' appends broad match data to its dedicated sheet.
- 'KeyWord Difficulty' appends the difficulty score.
- 'SERP Result' appends the extracted Search Engine Results Page analytics data.

This structured approach ensures that all keyword data is organized and immediately accessible in Google Sheets via this optimized n8n workflow.

Installation Guide

To deploy this n8n workflow, follow these steps:


  1. Import the n8n Workflow: Copy the provided JSON data and import it directly into your n8n instance using the 'New' -> 'Import from JSON' option.

  2. Set up Credentials:

- Google Sheets: You must configure a Service Account credential for the 'Google Docs account' used in the Google Sheets n8n node (ID: Rt0RWApx8PL9t0RF) and grant it access to the target spreadsheet. The sheet ID is defined as 1dCSO-gvmPD3O0QACeJaBFtjYGqtF-iF26iCuvm_Xw.
- RapidAPI: Update the 'Keyword Insights Request' and 'KeyWord Difficulty Request' HTTP Request n8n node settings. Replace the placeholder your key value in the x-rapidapi-key header parameter with your actual RapidAPI key.

  1. Activate the Trigger: Ensure the 'On form submission' n8n trigger is active. You may need to visit the node, save it, and view the live form link to test the new n8n workflow.

Node Details

On form submission (n8n trigger): The starting point of the n8n workflow. It is configured to accept required input fields: keyword and country.
Global Storage (n8n node: Set): Stores the input values from the form trigger as context variables (keyword, country) using expressions (={{ $json.keyword }}) for seamless reuse across all subsequent API calls.
Keyword Insights Request & KeyWord Difficulty Request (n8n node: HTTP Request): These nodes are crucial for data retrieval. They are configured as POST requests to the RapidAPI SEO endpoint, using the stored keyword and country variables in the body parameters and requiring custom headers for authentication (x-rapidapi-key).
Re-Format, Re-Format 2, Re -Format 5 (n8n node: Code): These custom scripting nodes use simple JavaScript (e.g., return $input.first().json.data.semrushAPI.broadMatchKeywords;) to isolate and return specific arrays or objects from the large JSON payload, preparing the data for structured insertion into Google Sheets.


  • Keyword Insights, KeyWord Difficulty, SERP Result (n8n node: Google Sheets): Configured to perform the 'Append' operation. Each Google Sheets n8n node targets a specific Sheet Name (e.g., 'Keyword Insights', 'KeyWord Difficulty', 'Serp Analytics') within the designated spreadsheet document, ensuring organized logging of the SEO analysis output.

Related n8n Workflows

Free

Nodes: 6 Nodes
Updated: December 26 2025
View all
Created by
Evoort Solutions
Evoort Solutions

Featured*