DEV Community

RyanCwynar
RyanCwynar

Posted on • Originally published at ryancwynar.com

Programmatic SEO in 2026: How I'm Using AI + n8n to Generate Hundreds of Pages

I've been building a system that automatically generates hundreds of SEO-optimized pages without me lifting a finger. Here's the full technical breakdown.

The Problem

Local service businesses live and die by search. Manually creating pages for every service + location combo? Impossible at scale.

The Architecture

My pipeline has three main components:

  1. Keyword Mining (n8n workflow, runs every 8 hours)
  2. Keyword Storage (PostgreSQL with deduplication)
  3. Page Generation (Node.js scripts + AI)

Part 1: Keyword Mining with n8n

n8n is my secret weapon for automation. My keyword mining workflow:

Schedule (every 8h) → Select Base Keywords → Google Autocomplete API → Process Results → Store in Postgres
Enter fullscreen mode Exit fullscreen mode

The Numbers

  • ~25 queries per run
  • ~100 keywords harvested every 8 hours
  • Running cost: $0 (self-hosted n8n + free autocomplete APIs)

Part 2: Database Schema

PostgreSQL handles the keyword storage with a processed flag to track which keywords have been turned into pages.

Part 3: AI-Powered Page Generation

A Node.js script groups keywords by service + location, generates content using Claude API, and creates Next.js pages with proper metadata.

The Results

After 2 weeks:

  • 347 keywords harvested
  • 89 pages generated
  • 12 first-page rankings for long-tail terms
  • 3x organic traffic increase

Avoiding Google Penalties

  1. Unique content: Every page has genuinely different copy
  2. Real value: Pages answer actual search intent
  3. No thin content: Minimum 800 words per page

Total monthly cost: ~$20 (mostly Claude API for generation)


Building something similar? Find me on LinkedIn.

Top comments (0)