Competitor SEO Keyword Tracker via Decodo + GPT-4o-mini + Google Sheets - n8n Workflow

Automate in-depth competitor SEO research using this advanced n8n workflow. Scrape content via Decodo, analyze keywords and strategy with GPT-4o-mini, and log structured insights in Google Sheets.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

SEO specialists and analysts needing to monitor competitors' content strategy.
Digital marketing teams looking for actionable, data-driven content recommendations.
Users seeking powerful, AI-driven n8n templates for market research.
Technical marketers aiming to automate data collection and analysis tasks using n8n.

Overview

Manually tracking and analyzing competitor SEO strategies is time-consuming and prone to errors. This specialized n8n workflow solves this by completely automating the process, combining high-fidelity web scraping with sophisticated large language model analysis. The automation begins by fetching raw content from a specified competitor URL using the Decodo service. This raw data is then passed to an OpenAI GPT-4o-mini model configured to act as an SEO analyzer, generating detailed metrics like keyword density, SEO strength scores, and content gaps in a structured JSON format. Finally, this actionable data is neatly appended to Google Sheets for ongoing tracking and visualization. If you are searching for robust n8n templates that bridge scraping and AI analysis, this n8n workflow provides a complete, repeatable solution.

How it Works

This comprehensive n8n workflow follows a sequential logic flow:


  1. Start the n8n Trigger: The process begins with a manual n8n trigger, allowing the user to initiate the analysis on demand. This could easily be converted to a Cron n8n trigger for scheduled, continuous monitoring.

  2. Set Input Fields: An n8n node sets the necessary input variables, specifically the competitor url and the target geo (geographical location) for the analysis.

  3. Scrape Content (Decodo): The Decodo n8n node takes the provided URL and securely scrapes the webpage content, returning the text and associated metadata.

  4. AI Analysis (Analyze Keywords): The scraped content is fed into the LLM chain. An OpenAI Chat Model (GPT-4o-mini) is instructed via a detailed prompt (acting as an SEO analyzer) to process the content and structure the output into a rich JSON object, detailing primary keywords, focus topics, optimization recommendations, and SEO scores.

  5. Extract Structured JSON (Code): Since LLMs sometimes wrap JSON output in markdown fences (e.g., ```json), a dedicated Code n8n node cleans up the text, removes wrappers, and reliably parses the text into a clean JSON object.

  6. Store Data (Google Sheets): The final step uses the Google Sheets n8n node to append the highly structured SEO data—including the keyword density summary and all associated metrics—into a designated Google Sheets document for historical tracking and reporting.

Installation Guide

To utilize this powerful n8n workflow, follow these steps:


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

  2. Configure Credentials: You will need to set up connections for three services:

Google Sheets: Connect your Google account, granting the necessary permissions for n8n to read and write to your Google Drive and Sheets.
Decodo API: Add your Decodo API key credential.
* OpenAI: Set up your OpenAI API key credentials for the Chat Model node, ensuring access to models like gpt-4o-mini.

  1. Customize the Spreadsheet: Ensure the target Google Sheet document ID and sheet name are correctly configured in the 'Google Sheets Append Row' n8n node.

  2. Define Inputs: Modify the 'Set the Input Fields' n8n node to specify the competitor URL and geographical context you wish to analyze before executing the n8n template.

Node Details

This n8n workflow utilizes several key nodes to achieve its goal:

When clicking ‘Execute workflow’ (Manual Trigger): This serves as the starting point, acting as the primary n8n trigger to manually launch the competitor analysis pipeline.
Set the Input Fields (Set n8n node): Used to inject fixed input parameters (url and geo) into the data stream before calling the scraping service.
Decodo n8n node: The crucial web scraping component. It is configured using expressions (={{ $json.geo }} and ={{ $json.url }}) to dynamically pull content based on the inputs defined earlier in the n8n workflow.
Analyze Keywords (LangChain LLM Chain): This n8n node orchestrates the AI analysis. It uses a very long, prescriptive prompt to ensure the output is a highly structured SEO analysis JSON, covering over 15 distinct data points.
OpenAI Chat Model for Keyword Analysis (LangChain LM ChatOpenAI n8n node): Configured to use a powerful, cost-effective model like gpt-4o-mini to perform the complex SEO analysis defined in the LLM chain.
Extract Structured JSON (Code n8n node): A utility n8n node written in JavaScript specifically to clean up and parse the LLM's response, making the structured data consumable by the final step.


  • Google Sheets Append Row (Google Sheets n8n node): The final destination for the analyzed data, configured to appendOrUpdate rows using the data mapped from the processed JSON.

Related n8n Workflows

Free

Nodes: 8 Nodes
Updated: December 26 2025
View all
Created by

A Professional based out of India specialized in handling AI-powered automations. Contact me at [email protected]

Featured*