...

How to Automate Your SEO Strategy with n8n and Airtable

In modern SEO, it’s not enough to collect a list of keywords — you also need to turn it into a working content strategy: categorize it, group it into semantic clusters, and generate ready-to-use article ideas. With n8n, you can automate this entire process — from pulling data out of Airtable to writing the final ideas back into the database.

In this guide, we’ll build a step-by-step workflow that:

  • loads keywords from Airtable;
  • categorizes each keyword;
  • clusters them by meaning and intent;
  • generates hub and spoke ideas (titles + descriptions);
  • saves the results back to Airtable.

This is perfect for SEO specialists, content managers, and website owners who want to move from manual keyword analysis to an automated process and get a ready-made content plan right away.

If you don’t have a working n8n instance yet, start with our guide: How to Install n8n Community Edition on a VPS.

You’ll also find these credential setup guides helpful:

Who This Guide Is For

Beginners in n8n and anyone doing SEO research. If you can work with Airtable, Excel, or CSV files and want to automate categorization and content generation — this step-by-step tutorial is for you.

What You’ll Need

  • A working n8n instance on VPS (follow our installation guide).
  • An Airtable base with a "Master Keyword Variations" table.
  • API keys: Airtable Personal Access Token; OpenAI or Vsegpt (or any other LLM) key.
  • Basic knowledge of n8n: how to add nodes and run workflows.

Workflow Logic Overview

The workflow is logically divided into blocks:

  1. Load — fetch records from Airtable.
  2. Prepare — collect necessary fields and format JSON for the AI.
  3. Categorize — AI classifies each keyword.
  4. Cluster — AI groups keywords by topic.
  5. Generate Ideas — create hub and spoke article ideas.
  6. Save — write everything back to Airtable.

Step-by-Step Workflow Setup in n8n

Step 1 — Manual Trigger

  • Add a Manual Trigger node — it runs the workflow manually for testing.
  • Useful during development: later, you can replace it with a Cron or Webhook trigger.

Step 2 — Set: Airtable Configuration

  • Add a Set node (name it “Set Airtable Fields”).
  • Create string fields and fill in your base configuration, e.g.:
    airtable_base_id = "appXXXXXXXXXXXX"
    master_all_kw_variations_table_id = "tblXXXXXXXXXXXX"
    categories_table_id = "tblXXXXXXXXXXXX"
    clusters_table_id = "tblXXXXXXXXXXXX"
    content_ideas_from_kws_table_id = "tblXXXXXXXXXXXX"
    content_ideas_from_clusters_table_id = "tblXXXXXXXXXXXX"
    

This lets you change table IDs in one centralized place.

Step 3 — Airtable: Get All Keywords

  • Node: Airtable — operation: Get All or Search (depending on dataset size).
  • Parameters: Base ID and Table ID are taken from “Set Airtable Fields” using n8n expressions:
    {{$node["Set Airtable Fields"].json["airtable_base_id"]}}
  • Credentials: Airtable Personal Access Token (create and paste into n8n Credentials).
  • Tip: for large tables, enable pagination (limit / page size) and use Split In Batches.

Step 4 — Set: Map Fields (Set WF Fields)

  • Add another Set node (“Set WF Fields”) to map Airtable fields into workflow variables, e.g.:
keyword -> {{$json["fields"]["Keyword"]}}
msv -> {{$json["fields"]["MSV"]}}
competition -> {{$json["fields"]["Competition"]}}
search_intent -> {{$json["fields"]["Intent"]}}
primary_keyword -> {{$json["fields"]["Primary Keyword"]}}

This makes later expressions cleaner and reduces errors.

Step 5 — Aggregate Keywords for Agent

  • Add an Aggregate node to combine all records into a single structure — useful for clustering when the AI needs to see the entire list.
  • Result field example: keyword_dataset — a JSON string containing all keywords and metrics.
// Example content: keyword_dataset:
[
	{"keyword": "купить дрель", "msv": 1200, "competition": 0.45, "intent": "transactional"},
	{"keyword": "как выбрать дрель", "msv": 400, "competition": 0.2, "intent": "informational"},
...
]

Step 6 — Set Field for Agent

  • Create a keyword_dataset field (String type) — it will be passed to the LangChain/OpenAI node.
  • Important: Limit dataset size if it’s large, or split it into batches.

Step 7 — Categorization: Category AI Agent

  • Add a LangChain Agent / OpenAI node (“Category AI Agent”).
  • Model: gpt-4, gpt-4.1-mini, or your Vsegpt (for budget-friendly runs).
  • System prompt example:
System:
You are an SEO expert. For each input keyword, return a strict JSON array with:
- keyword
- category (Quick Wins | Authority Builders | Emerging Topics | Intent Signals | Semantic Topics | Unknown)
- reasoning (short explanation why this category)
Output format: JSON array.
User:
{{$json["keyword_dataset"]}}

Expected response:

[
	{"keyword":"buy a drill","category":"Quick Wins","reasoning":"high transactional intent, MSV 1200"},
	{"keyword":"how to choose a drill","category":"Authority Builders","reasoning":"informational intent, fits a guide
	format"}
]

Step 8 — Save Categories to Airtable

Add a Set node to parse the AI’s JSON into fields (keyword, category, reasoning), then an Airtable Create node to write into the "Keyword Categories" table.

Step 9 — Filter Out "Unknown"

  • Use a Filter node to exclude records where category = "Unknown".
  • Then, add a Set node to prepare fields for content idea generation.

Step 10 — Generate Ideas per Keyword (Loop / Batch)

  • Add a Split In Batches (Loop Over Items) node to send keywords one by one to the AI for generating titles and descriptions.
  • Add another LangChain Agent ("Content Ideas from Category AI Agent").

Prompt example:

System:
You are a copywriter and SEO expert. For the given keyword and its category, create:
- title (max 70 chars)
- meta_description (max 160 chars)
- content_brief (3–5 key points for the article)
Output: JSON {keyword, title, meta_description, content_brief}
User:
{"keyword":"buy a drill","category":"Quick Wins","reasoning":"..."}

Step 11 — Clustering (AI Agent Analyze and Cluster KWs)

  • This block takes the entire keyword list and returns clusters in JSON format:
    [
      {
        "cluster_name":"Home Drills",
        "core_topic":"household drills",
        "intent_pattern":"transactional + informational",
        "keywords":["buy a drill","home drills","best drills 2025"],
        "reasoning":"related commercial and informational queries",
        "primary_keyword":"buy a drill"
      }
    ]
    
  • Parameters: Ask the model to assign each keyword to only one cluster.

Step 12 — Generate Hub & Spoke Ideas (Agent Create Content Opps)

  • For each cluster, prompt the AI to generate:
    • Hub (pillar) — the main article on the topic
    • Up to 5 Spokes — supporting articles
  • Prompt example:
  • System:
    For the given cluster, create:
    - hub: object {title, description, recommended_word_count, sections[]}
    - spokes: up to 5 objects {title, description, target_keyword}
    Output: JSON
    User:
    {"cluster_name":"Home Drills","keywords":[...],"primary_keyword":"buy a drill"}
    

Step 13 — Save Clusters and Ideas to Airtable

  • Parse the AI output and create records in Clusters and Content Ideas from Clusters tables.
  • Include fields like: cluster_name, core_topic, intent_pattern, keywords, reasoning, primary_keyword, hub_title, spoke_titles, etc.

Step 14 — Testing and Validation

  • Run the workflow manually and inspect each node output (Execution → preview output).
  • If the AI returns invalid JSON — enforce strict format requirements like: "Output MUST be valid JSON."
  • For large datasets — split input into chunks and process sequentially.

Example JSON Outputs

Categorization example:

[
	{"keyword":"buy a drill","category":"Quick Wins","reasoning":"high transactional intent"},
	{"keyword":"best drills 2025","category":"Authority Builders","reasoning":"review-type query"}
]

Clustering example:

[
	"clusters": [
		{
			"cluster_name":"Home Drills",
			"core_topic":"household drills",
			"intent_pattern":"transactional",
			"keywords":["buy a drill","cheap drills"],
			"primary_keyword":"buy a drill",
			"reasoning":"commercial keywords with high conversion potential"
		}
	]
}

Glossary

  • Hub (pillar) — a large, comprehensive article on the main topic, e.g. “Complete Guide to Choosing a Drill.” It connects related pages and boosts topical authority.
  • Spoke article — a narrow supporting article, e.g. “How to choose a drill bit”, “Top 5 Cordless Drills 2025.” Spokes link to the hub and vice versa — it is a hub-and-spoke structure.
  • MSV (Monthly Search Volume) — the average number of monthly searches for a keyword. Helps to evaluate potential traffic.
  • Search Intent — User goal: informational (learn), navigational (find a website), transactional (buy), commercial investigation (compare before buying). The correct category helps you create content that meets the user's needs.
  • Airtable — an online spreadsheet/database (base → table → record → field). For n8n, you will specify the Base ID and Table ID when working with the Airtable node.
  • Node — a workflow building block in n8n (trigger, HTTP request, Set, Airtable, OpenAI, etc.). Each node performs an action and passes the data on.
  • Manual Trigger — manual workflow starter, can be replaced later with Cron or Webhook.
  • Set node — creates/maps fields inside a workflow (convenient for data preparation).
  • Aggregate node

    — merges records into a single JSON object — useful for transferring a large array to a clustering model.
  • Split In Batches — splits arrays into smaller chunks to process one or N records; important when interacting with APIs with limits.
  • LangChain Agent / Agent — node using LLMs like OpenAI or Vsegpt for complex logic (used for categorization, clustering, and content generation).
  • Prompt — the text you send to the AI model (system + user + examples). The more precise the format and requirements, the more accurate the response (especially request strict JSON).
  • JSON — data exchange format (JavaScript Object Notation). It is more convenient to transfer all information between nodes in JSON.
  • Credentials / API Key / OAuth2 — authentication data for external services (Airtable, OpenAI, Google). Store them in n8n Credentials and do not commit them to public repositories.
  • Rate limits — API request limits; use batching, delays, or retries to handle them.

Pre-Launch Checklist

  • Verify Airtable credentials and write permissions.
  • Check OpenAI / Vsegpt API key limits and setup.
  • Test the workflow on a small dataset (5–10 records). Ensure that the model returns valid JSON.
  • Add comments or sticky notes for easier maintenance.

Common Issues and Fixes

  • Invalid JSON from AI → add "Output MUST be valid JSON. If you cannot, return an error field."
  • Empty Airtable fields → check field mappings in Set nodes ({{$node[...]}}).
  • Rate limit / 429 errors → slow down requests with batches and delays. Enable retry in the nodes.
  • No records saved → check Airtable token permissions and Table IDs.

Example Prompts

Categorization:


System:
You are an SEO analyst. Receive an array of objects {keyword,msv,competition,intent}
and return {keyword,category,reasoning}.
Categories: Quick Wins, Authority Builders, Emerging Topics, Intent Signals, Semantic Topics, Unknown.
Output MUST be valid JSON.

Clustering:


System:
Analyze the keyword array and group them into semantic clusters.
Each cluster: {cluster_name,core_topic,intent_pattern,keywords[],primary_keyword,reasoning}.
Output MUST be a valid JSON array "clusters".

Download ready-made workflow JSON: SEO-Keywords-Categorization-and-Content-Strategy.json

One More Step Toward Maximum Efficiency!

To ensure your n8n workflow runs smoothly with large datasets, host n8n and related services on a reliable VPS.

We provide high-performance VPS servers in Russia and Europe — with guaranteed resources, low latency, and full configuration freedom.

Order a European VPS today and accelerate your SEO processes!

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

    We use a variety of tools, including cookies, to provide the basic services and functionality of our site, and to collect data about how visitors interact with our site, products and services. By clicking "Accept", you agree to the current terms and conditions of use of the site and give permission to use this data. Otherwise, please leave the site.

    Spelling error report

    The following text will be sent to our editors:

    Seraphinite AcceleratorOptimized by Seraphinite Accelerator
    Turns on site high speed to be attractive for people and search engines.