Skip to main content

Fetch keyword from Google Sheet and classify them using AI

Workflow preview

Workflow preview
100%
Fetch keyword from Google Sheet and classify them using AI preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Who is this template for This template is for marketers, SEO specialists, or content managers who need to analyze keywords to identify which ones contain references to a specific area or topic, in ...

Best for

  • Market Research automation workflows
  • AI Summarization automation workflows
  • intermediate n8n builders looking for reusable templates

Tools used

n8n-nodes-base.manualtrigger, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.lmchatopenai, @n8n/n8n-nodes-langchain.outputparserstructured, n8n-nodes-base.googlesheets, n8n-nodes-base.splitinbatches, n8n-nodes-base.wait

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Polina Medvedieva.

Original n8n.io source

1.1 Workflow description

Title
Fetch keyword from Google Sheet and classify them using AI
Workflow name
Fetch keyword from Google Sheet and classify them using AI

Who is this template for

This template is for marketers, SEO specialists, or content managers who need to analyze keywords to identify which ones contain references to a specific area or topic, in this case – IT software, services, tools, or apps.

Use case

Automating the process of scanning a large list of keywords to determine if they reference known IT products or services (like ServiceNow, Salesforce, etc.), and updating a Google Sheet with this classification. This helps in categorizing keywords for targeted SEO campaigns, content creation, or market analysis.

How this workflow works

  1. Fetches keyword data from a Google Sheet
  2. Processes keywords in batches to prevent rate limiting
  3. Uses an AI agent (OpenAI) to analyze each keyword and determine if it contains a reference to an IT service/software
  4. Updates the original Google Sheet with the results in a "Service?" column
  5. Continues processing until all keywords are analyzed

Set up steps

  1. Connect your Google Sheets account credentials
  2. Set the Google Sheet document ID (currently using "Copy of Sheet1 1")
  3. Configure the OpenAI API credentials for the AI agent
  4. Adjust the batch size (currently 6) if needed based on your API rate limits
  5. Ensure the Google Sheet has the required columns: "Number", "Keyword", and "Service?"

The AI agent's prompt is highly customizable to match different identification needs. For example, instead of looking for IT software/services, you could modify the prompt to identify:

  • Industry-specific terms (healthcare, finance, education)
  • Geographic references (cities, countries, regions)
  • Product categories (electronics, clothing, food)
  • Competitor brand mentions

Here's how you could modify the prompt for different use cases:

Copy
// For identifying educational content keywords
"Check the keyword I provided and define if this keyword relates to educational content, courses, or learning materials and return yes or no."

// For identifying local service keywords
"Check the keyword I provided and determine if it contains location-specific terms (city names, neighborhoods, regions) that suggest local service intent and return yes or no."

// For identifying competitor mentions
"Check the keyword I provided and determine if it mentions any of our competitors (CompetitorA, CompetitorB, CompetitorC) and return yes or no."

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - When clicking ‘Test workflow’

Type / Role
n8n-nodes-base.manualTrigger - manualTrigger
Config choices
Version 1

Block 2 - AI Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 1.7

Block 3 - OpenAI Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

Block 4 - Structured Output Parser

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.2

Block 5 - Fetch Keywords from Sheet

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.5

Block 6 - Process Keywords in Batches

Type / Role
n8n-nodes-base.splitInBatches - splitInBatches
Config choices
Version 3

Block 7 - Prevent API Rate Limiting

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1.1

Block 8 - Update Sheet with Analysis Results

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.5

3. Summary Table

Workflow Fetch keyword from Google Sheet and classify them using AI
Complexity intermediate
Nodes 8
Categories Market Research, AI Summarization
Author Polina Medvedieva
Published 19 Feb 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/2945/2945.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Fetch keyword from Google Sheet and classify them using AI do?

Who is this template for This template is for marketers, SEO specialists, or content managers who need to analyze keywords to identify which ones contain references to a specific area or topic, in ...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Market Research, AI Summarization use case.