Automate blog publishing from PostgreSQL to WordPress with OpenAI GPT
Ready for 3.0Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.
What this workflow does
This AI workflow has 8 nodes and runs on a schedule (every day). Along the way it connects Postgres, Wordpress and OpenAI Chat Model.
How it runs
Trigger: On a schedule (every day).
- Postgres: run a query
- 🔍 Check Record Exists (If): checks a condition and branches into true / false
- 🤖 Generates Blog Post (AI Agent): runs an AI agent, with model: OpenAI Chat Model
- 📝 Format Blog Data (Code): runs custom JavaScript code
- Wordpress: uses Wordpress
- 💾 Update Database (Postgres): run a query
Services it uses
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (7)
- Postgres
n8n-nodes-base.postgres - Schedule Trigger
n8n-nodes-base.scheduleTrigger - Code
n8n-nodes-base.code - Wordpress
n8n-nodes-base.wordpress - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - If
n8n-nodes-base.if - AI Agent
@n8n/n8n-nodes-langchain.agent
From the author
How it works This workflow automatically generates and publishes marketing blog posts to WordPress using AI. It begins by checking your PostgreSQL database for unprocessed records, then uses OpenAI to create SEO-friendly, structured blog content. The content…