Auto-generate & publish SEO articles to WordPress with GPT-4 + Postgres tracking
Needs changesWhat this workflow does
This AI workflow has 23 nodes and runs on a schedule (every hour). Along the way it connects OpenAI Chat Model and Postgres.
How it runs
Trigger: On a schedule (every hour).
- Config (Edit Fields (Set)): sets 1 field: domain
- Load Categories (HTTP Request): calls an HTTP API
- Category Filter (Code): runs custom JavaScript code
- Selecting recent (Postgres): run a query
- Picks Less Used (Code): runs custom JavaScript code
- 10 latest headlines (Postgres): run a query
- Merge: merges the data from its input branches
- AI Agent: runs an AI agent, with model: OpenAI Chat Model
- Combines full post meta (Code): runs custom JavaScript code
- New article title (Code): runs custom JavaScript code
…plus 9 more steps. See the full node list below.
Services it uses
Before you upgrade to n8n 3.0
1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:
- AI Agent v1 (old agent modes) in AI Agent SEO Headings (v1.9), AI Agent SEO writer (v1.9): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).
| Removed in 3.0 | Replace with |
|---|---|
| AI Agent v1 (old agent modes) AI Agent SEO Headings (v1.9), AI Agent SEO writer (v1.9) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
Nodes used (9)
- Schedule Trigger
n8n-nodes-base.scheduleTrigger - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - HTTP Request
n8n-nodes-base.httpRequest - Code
n8n-nodes-base.code - Merge
n8n-nodes-base.merge - Postgres
n8n-nodes-base.postgres - AI Agent
@n8n/n8n-nodes-langchain.agent - No Operation, do nothing
n8n-nodes-base.noOp - Edit Fields (Set)
n8n-nodes-base.set
From the author
🚀 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…