SERP Analysis and Keyword Intent Classification with Gemini AI - n8n Workflow

Automate SERP analysis using this powerful n8n workflow. Scrape Google data via Bright Data, classify keyword intent with Gemini AI, and track results in Google Sheets. Get this n8n template.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

SEO Specialists and Content Strategists needing scalable intent analysis.
Digital Marketing Agencies managing large keyword portfolios.
Users looking for advanced n8n templates integrating scraping and AI.
Data analysts needing automated SERP data collection using an n8n workflow.


  • Businesses wanting to leverage the Google Gemini AI n8n node for classification tasks.

Overview

Understanding user intent is crucial for successful SEO. Manually checking the search engine results page (SERP) for hundreds of keywords is time-consuming. This sophisticated n8n workflow solves this by fully automating the process.

This robust n8n workflow leverages the power of Bright Data for highly reliable SERP scraping, ensuring accurate extraction of the top organic results (title, description, and link). The crucial value lies in the immediate analysis performed by the LangChain Text Classifier n8n node, which utilizes the Google Gemini Chat Model to determine if the keyword intent is Informational, Transactional, Commercial, or Navigational based on the pages currently ranking.

By implementing this n8n template, you gain a massive efficiency boost, instantly turning raw keyword data into actionable, intent-classified insights stored directly in Google Sheets. The automation starts with a simple n8n trigger, making data acquisition and AI classification seamless.

How it Works


  1. Trigger and Data Fetch: The process starts via a manual n8n trigger ("When clicking ‘Execute workflow’"). It immediately connects to Google Sheets using the Google Sheets n8n node to retrieve a list of target keywords and their associated country codes.

  2. Looping and Preparation: The workflow uses a 'Loop Over Items' n8n node to process each keyword individually. A 'set keyword' n8n node structures the input data for the scraper, mapping the Keyword and country code.

  3. SERP Scraping: An HTTP Request n8n node configured for Bright Data’s SERP API executes the Google search scrape for the specific keyword and country code defined in the n8n workflow.

  4. Data Segmentation: The Split Out n8n node isolates each organic search result item (title, link, position, description) from the raw JSON response, preparing multiple items for the next step.

  5. Data Mapping: The format fields n8n node cleans and structures the extracted SERP data, defining key output fields like ranking page, title, and position before intent classification.

  6. AI Classification: The Intent Classifier n8n node (powered by the Gemini AI n8n node) analyzes the keyword and the associated top-ranking page titles/descriptions to categorize the intent. The logic routes the result down five parallel paths (Informational, Navigational, Commercial, Transactional, Mixed).

  7. Data Finalization and Storage: The categorized items are rejoined by the Merge intents n8n node. Finally, the append ranking result Google Sheets n8n node writes the complete, intent-classified SERP data back to the designated results sheet, concluding the n8n workflow.

Installation Guide


  1. Import the n8n template: Copy the provided JSON into your n8n instance using the 'Import Workflow' function.

  2. Google Sheets Setup: You need a Google Sheets credential for the two Google Sheets n8n node instances (Get Keywords and append ranking result). Update the Document ID and Sheet Name parameters in both n8n node instances to point to your new spreadsheet where keywords and results are stored.

  3. Bright Data Credentials: Configure a HTTP Header Auth credential for Bright Data, using your Zone API key. Ensure your Bright Data SERP API zone name (e.g., serp_api1) matches the configuration in the Fetch Google Search Results JSON n8n node. Review the sticky note instructions for Bright Data setup within this n8n workflow.

  4. Gemini AI Setup: Provide the API key for the Google Gemini Chat Model2 n8n node. This uses the PaLM/Gemini credential type within n8n.

  5. Execution: Once all credentials and connections are established, execute the n8n workflow manually via the starting n8n trigger to begin processing.

Node Details

When clicking ‘Execute workflow’ (Manual n8n trigger): Initiates the entire scraping and analysis process upon user click.
Google Sheets (Get Keywords): Reads the input list of keywords and country code parameters from the source sheet, beginning the automated keyword research n8n workflow.
HTTP Request (Fetch Google Search Results JSON): Crucial scraping n8n node. Connects to Bright Data's SERP API to retrieve raw JSON results from Google based on the input keyword. Note the use of the genericCredentialType for authentication.
Split Out: Splits the array based on the organic field so that data from each top-ranking page can be analyzed individually by the AI.
Set (format fields): Restructures the scraped data, defining key output fields like ranking page, title, and position before feeding it to the AI.
Intent Classifier (Langchain Text Classifier n8n node): The core intelligence. This n8n node takes the keyword and SERP snippets and uses the underlying LLM to categorize the search intent (Informational, Transactional, etc.).
Google Gemini Chat Model2 (Gemini n8n node): Provides the language model capability utilized by the classifier n8n node to perform the sophisticated semantic analysis.
Google Sheets (append ranking result): The final step of the n8n workflow, where the scraped, classified data is saved back to the spreadsheet using the appendOrUpdate operation.

Related n8n Workflows

Free

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

Automation expert with years of experience helping businesses improve their efficiency and productivity with smart automations that are affordable, scalable, and flexible.

Featured*