Fetching latest headlines…
How I Built a Programmatic SEO Pipeline with n8n + Claude API (and deployed 200+ pages in 3 days)
NORTH AMERICA
πŸ‡ΊπŸ‡Έ United Statesβ€’June 21, 2026

How I Built a Programmatic SEO Pipeline with n8n + Claude API (and deployed 200+ pages in 3 days)

0 views0 likes0 comments
Originally published byDev.to

A few months ago, a client asked me to rank on 150+ local search queries across 5 cities β€” with a budget that wouldn't cover a single traditional agency retainer.

Instead of writing 150 articles manually, I built a pipeline. Here's exactly how it works.

The problem with traditional SEO at scale

Creating geo-targeted content manually is slow, expensive, and inconsistent. You need a writer who understands SEO structure, knows the local context, and can maintain quality across hundreds of pages.

I replaced that process with a system: n8n + Claude API + WordPress REST API.

The architecture

Google Sheets (input)
β†’ n8n workflow
β†’ Claude API (content generation)
β†’ WordPress REST API (publish)
β†’ Next.js revalidation (ISR)
Three tools. One trigger. Zero manual publishing.

Step 1 β€” The input sheet

Each row in Google Sheets defines one page:

city service target_keyword population competitors
Cotonou n8n automation consultant n8n cotonou 800000 ...
Abidjan automatisation automatisation processus abidjan 4M ...
n8n reads this sheet on a schedule (or on-demand via webhook).

Step 2 β€” The n8n workflow

The core workflow has 6 nodes:

Google Sheets trigger β€” reads unprocessed rows (status = "pending")
HTTP Request β€” calls Claude API with a structured prompt
JSON parser β€” extracts title, slug, content, excerpt, tags
WordPress REST API β€” creates the post as draft
Google Sheets update β€” marks row as "published" with the post URL
Next.js revalidation β€” calls /api/revalidate to clear ISR cache
The Claude prompt is the critical piece. Here's a simplified version:

You are an SEO content expert. Write a complete article for:

  • Service: {{service}}
  • City: {{city}}
  • Target keyword: {{target_keyword}}
  • Word count: 2000+ words
  • Language: French

Required structure:

  1. intro-block (50 words max, direct answer)
  2. 4 stats (local market data)
  3. 8+ H2 sections with rich content
  4. Comparison table
  5. FAQ (8-10 questions, accordion format)
  6. CTA block linking to /contact

Return valid JSON: { title, slug, excerpt, content, tags[], read_time }
Step 3 β€” The WordPress REST API call

// n8n HTTP Request node
POST https://your-site.com/wp-json/wp/v2/posts
Authorization: Bearer {{wp_token}}

{
"title": "{{title}}",
"slug": "{{slug}}",
"content": "{{content}}",
"status": "publish",
"categories": [{{category_id}}],
"meta": {
"excerpt": "{{excerpt}}"
}
}
Step 4 β€” Next.js ISR revalidation

If you're running Next.js in front of WordPress (or a custom backend), you need to bust the cache after publishing:

// app/api/revalidate/route.ts
import { revalidatePath } from 'next/cache';
import { NextRequest, NextResponse } from 'next/server';

export async function POST(req: NextRequest) {
const { slug } = await req.json();
const secret = req.headers.get('x-revalidate-secret');

if (secret !== process.env.REVALIDATE_SECRET) {
return NextResponse.json({ error: 'Unauthorized' }, { status: 401 });
}

revalidatePath(/blog/${slug});
return NextResponse.json({ revalidated: true });
}
n8n calls this endpoint after each publish. The page is live and indexed within minutes.

Results

200+ geo-targeted pages deployed in 3 days
Average 2,100 words per page, consistent structure
Zero duplicate content issues (city + service combinations are unique)
First rankings appearing within 3 weeks on low-competition queries
The pipeline runs unattended. I trigger it manually for client reviews, but it could run fully automated on a cron.

What I learned

Prompt engineering is the bottleneck. Getting Claude to output valid JSON with correct HTML structure every single time took more iteration than the n8n workflow itself. Add a validation node that checks the JSON before publishing β€” don't skip this.

WordPress REST API rate limits exist. If you're deploying 200 pages in one run, add a Wait node between requests (2-3 seconds). Otherwise you'll hit 429s.

ISR cache busting matters. Without it, your newly published pages serve stale "404 not found" content for hours. Always wire the revalidation call into the workflow.

The bigger picture

I build these kinds of systems for clients β€” SEO pipelines, automation workflows, AI integrations. If you're a dev who's curious about the business side of this, or an entrepreneur who wants to understand what's possible: this is what modern digital agencies actually do when they stop charging by the hour for manual work.

I document more of this on my site: paulmaximedossou.com

Audits are free. DMs are open.

Paul Maxime Dossou β€” Founder of EkoMedia. I build automation systems, SEO pipelines, and AI integrations for businesses in France and West Africa.

Comments (0)

Sign in to join the discussion

Be the first to comment!