Automated Competitor Keyword Analysis and Google Sheets Reporting - n8n Workflow

Use this powerful n8n workflow to analyze competitor keywords via RapidAPI and automatically log detailed SEO metrics into Google Sheets. Perfect for data-driven marketers.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • SEO Specialists and Digital Marketers.

  • Marketing Agencies needing efficient competitor intelligence.

  • Users seeking practical n8n templates for marketing research.

  • Anyone who wants to automate API consumption and data logging using an n8n node sequence.

Overview

This comprehensive n8n workflow automates the process of gathering critical competitor keyword data and centralizing it for analysis. It eliminates the need for manual API calls and data entry into spreadsheets. By using an intuitive form as the initial n8n trigger, users can quickly submit a competitor URL and target country. The subsequent n8n node structure handles secure communication with the RapidAPI service, extracts specific keyword metrics (like Search Volume, CPC, and competition), and automatically structures this data into a Google Sheet. This makes the entire operation repeatable and scalable, proving the power of this type of n8n templates for data-driven professionals. The resulting Google Sheet becomes a living database of competitor insights, fully powered by this efficient n8n automation.

How it Works

The process begins with the On form submission n8n trigger, which prompts the user for the target website and country. This form submission immediately activates the rest of the n8n workflow. The submitted inputs are then routed to the Competitor Keyword Analysis n8n node (an HTTP Request), which sends a POST request to the specified RapidAPI endpoint. This n8n node is configured to pass the website and country data dynamically. Once the API returns the complex JSON payload, the Reformat Code n8n node executes a short JavaScript script (return $input.first().json.data.semrushAPI.domainOrganicSearchKeywords;). This step is crucial for transforming the data, isolating the array of keywords and related metrics for clean processing. Finally, the cleaned, structured data is passed to the Google Sheets n8n node, which performs an 'Append' operation, adding the complete set of keyword details (including search volume, CPC, and position) into the designated Google Sheet, thus finalizing the reporting aspect of this n8n workflow.

Installation Guide


  1. Import the n8n workflow: Copy the provided JSON code and paste it into your n8n canvas via the 'New' menu -> 'Import from JSON'.

  2. Set up the n8n Trigger: Activate the On form submission n8n trigger. You can share the resulting webhook URL to embed the form or access it directly.

  3. RapidAPI Configuration: Select the Competitor Keyword Analysis n8n node. You will need to replace the placeholder your key in the Header Parameters with your actual X-RapidAPI-Key for the Competitor Keyword Analysis service.

  4. Google Sheets Credentials: Configure the Google Sheets n8n node. Set up your Google Sheets Service Account credentials and specify the URL or ID of the spreadsheet and the exact sheet name where the keyword data should be appended. Ensure the service account has write access to the target document. Once credentials are set, save and activate the n8n workflow.

Node Details

On form submission (formTrigger n8n trigger):
Function: Serves as the initial n8n trigger, collecting user input to start the analysis.
Key Configuration: Configured to accept two required fields: website and country (e.g., 'in').
Competitor Keyword Analysis (HTTP Request n8n node):
Function: Executes the API call to the RapidAPI endpoint, fetching competitor keyword data using the user's input.
Key Configuration: Uses a POST method; body parameters dynamically map website and country fields from the trigger node; requires a valid x-rapidapi-key credential.
Reformat Code (Code n8n node):
Function: Transforms the raw API response to extract the specific array containing keyword data, making it ready for the Google Sheets n8n node.
Key Configuration: Custom JavaScript code isolates the relevant data path: return $input.first().json.data.semrushAPI.domainOrganicSearchKeywords;.
Google Sheets (Google Sheets n8n node):
Function: Appends the structured keyword data (including search volume, CPC, competition, and position) into the designated spreadsheet.
Key Configuration: Operation set to append; requires Service Account authentication; automatically maps input data fields to spreadsheet columns based on the API response structure.

Related n8n Workflows

Free

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

Featured*