AI-Powered Keyword Classification and Google Sheets Updater - n8n Workflow

Use this powerful n8n workflow to fetch SEO keywords from Google Sheets, classify them using the OpenAI AI Agent n8n node, and automatically update your spreadsheet for rapid data analysis.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • SEO Specialists managing large keyword datasets.

  • Marketing Analysts needing to classify data points rapidly.

  • Users looking for advanced examples of n8n templates integrating LangChain agents.

  • Anyone seeking a practical application of the OpenAI n8n node for data enrichment.

Overview

This essential n8n workflow template is designed for data analysts and SEO professionals who manage extensive keyword lists. Instead of manually auditing thousands of entries to identify brand or service mentions, this n8n automation leverages advanced artificial intelligence capabilities through a specialized n8n node setup (AI Agents). The core value of this n8n workflow is automating the classification process: it checks if a keyword contains the name of a known IT software or service (like 'Salesforce' or 'ServiceNow'). By efficiently fetching data, classifying it in batches, and automatically updating the spreadsheet, this n8n workflow ensures high data accuracy, massive time savings, and serves as one of the most practical n8n templates for systematic data analysis.

How it Works

The process begins with the Manual n8n Trigger, initiating the data flow when you click ‘Test workflow’ or ‘Activate’.


  1. Data Fetch: The Google Sheets n8n node, named 'Fetch Keywords from Sheet', retrieves the required keyword data from the configured spreadsheet.

  2. Batch Processing: The 'Process Keywords in Batches' n8n node splits the fetched data into manageable groups (set to 6 items per batch) to ensure efficient processing and API management.

  3. Rate Control: The 'Prevent API Rate Limiting' Wait n8n node introduces a pause between batches, safeguarding against external API overuse.

  4. AI Analysis: The core 'AI Agent' n8n node executes the classification logic. It takes the individual keyword as input and applies a strict system message: determine if the keyword contains a known IT software or service name, returning a strict 'yes' or 'no'. This agent is powered by the 'OpenAI Chat Model' n8n node (using gpt-4o-mini) and refined by the 'Structured Output Parser' n8n node to guarantee consistent JSON output, specifically for the field Isservice.

  5. Data Update: The final Google Sheets n8n node, 'Update Sheet with Analysis Results', writes the AI's classification result back to the original sheet. It uses the row's existing 'Number' column as a unique identifier to match and update the corresponding 'Service?' column with the classified result from the n8n agent.

Installation Guide

To deploy this n8n workflow, follow these steps:


  1. Import: Copy the provided JSON data and import it directly into your n8n instance.

  2. Google Sheets Credentials: Locate the two Google Sheets n8n node instances. You must configure your Google Sheets OAuth2 API credentials and select the specific spreadsheet ID and sheet name containing your keywords.

  3. OpenAI Credentials: Select or create your OpenAI API credentials within the 'OpenAI Chat Model' n8n node.

  4. Configuration Check: Ensure your spreadsheet contains a column identifiable by 'Number' (used for row matching) and a target column to receive the output, such as 'Service?'. Review the parameter settings in the 'Update Sheet with Analysis Results' n8n node.

  5. Run: Use the manual n8n trigger to test the n8n workflow. The 'When clicking ‘Test workflow’' n8n trigger allows you to execute the entire process immediately.

Node Details

When clicking ‘Test workflow’ (Manual Trigger n8n node): This is the manual n8n trigger that starts the automation. It allows instant execution for testing or batch runs.
Fetch Keywords from Sheet (Google Sheets n8n node): Reads data from the target Google Sheet. Crucial for pulling the keyword list into the n8n workflow environment.
Process Keywords in Batches (Split In Batches n8n node): Manages API load by splitting the keyword list into batches of 6, ensuring the n8n template runs smoothly without immediate rate limits.
Prevent API Rate Limiting (Wait n8n node): Introduces a delay between the processing of batches, optimizing the interaction with the OpenAI API.
AI Agent (AI Agent n8n node - LangChain): The core intelligence of this n8n workflow. It takes the keyword input and executes the classification based on the predefined system prompt (checking for IT software/service names).
OpenAI Chat Model (Chat Model n8n node): Provides the large language model capability, using gpt-4o-mini, which the AI Agent n8n node relies on.
Structured Output Parser (Output Parser n8n node): Ensures that the AI Agent's response is formatted consistently as JSON, extracting the definitive 'Isservice' result.
Update Sheet with Analysis Results (Google Sheets n8n node): Performs an 'update' operation, writing the classification outcome (Isservice value) back to the Google Sheet, matching the correct row via the 'Number' column. This completes the data enrichment aspect of this powerful n8n workflow.

Related n8n Workflows

Free

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

I do SEO & marketing for n8n and here I share workflows that help with creating content, optimizing on-page SEO and automate SEO processes.

Featured*