Skip to main content

Auto-generate & publish SEO articles to WordPress with GPT-4 + Postgres tracking

Workflow preview

Auto-generate & publish SEO articles to WordPress with GPT-4 + Postgres tracking preview
Open on n8n.io

Important notice

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

Overview

πŸš€ What this flow does β€’ πŸ”Ž Selects the least-used WordPress category (tracked in PostgreSQL) β€’ πŸ€– Uses GPT (4-mini or better) to generate a fully formatted SEO article with headings, TOC, lists, CTA, and Yoast blocks β€’ πŸ–ΌοΈ Creates a placeholder cover image and uploads it to WordPress Media β€’ πŸ“¬ Publishes the final post via /wp-json/wp/v2/posts with correct category + featured image β€’ 🧠 Logs the used category for future rotation (zero duplicates!)

βš™οΈ Setup in 3 mins

🏷️ Add your WordPress domain with a simple Set node:     domain=https://yourdomain.com

πŸ” Create these 3 credentials in n8n: Β Β Β Β YOUR_WORDPRESS_CREDENTIAL β€” for /media, /posts Β Β Β Β YOUR_POSTGRES_CREDENTIAL β€” for category tracking Β Β Β Β YOUR_OPENAI_CREDENTIAL β€” GPT-4-mini or better

🧱 Run the SQL from docs to create the used_categories table

βœ… Manually test first 3–5 nodes to check WP auth, OpenAI response, and DB connection

πŸ•’ Then just schedule it and let the bot write for you.

🎯 Why it's awesome This is your personal AI content writer + publisher β€” perfect for: β€’ πŸ“° SEO content farms β€’ πŸ“ˆ Affiliate blogs β€’ 🧰 Micro niche sites β€’ 🀫 PBNs with rotation-safe automation

No more manual uploads, broken categories, or GPT spam. Every post is structured, beautiful, and intelligently categorized.