Skip to main content

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

Workflow preview

Workflow preview
100%
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.

1. Workflow 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, C...

Best for

  • Content Creation automation workflows
  • Multimodal AI automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.scheduletrigger, @n8n/n8n-nodes-langchain.lmchatopenai, n8n-nodes-base.httprequest, n8n-nodes-base.code, n8n-nodes-base.merge, n8n-nodes-base.stickynote, n8n-nodes-base.postgres, @n8n/n8n-nodes-langchain.agent

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by AlexWantMoreB.

Original n8n.io source

1.1 Workflow description

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

🚀 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.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Schedule Trigger

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1.2

Block 2 - OpenAI Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

Block 3 - Download Image

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 4 - Prepare Post JSON

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 5 - Merge

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.1

Block 6 - OpenAI Chat Model1

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

Block 7 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 8 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 9 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 10 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 11 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 12 - Sticky Note5

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 13 - Sticky Note6

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 14 - Sticky Note7

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 15 - Sticky Note8

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 16 - Sticky Note9

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 17 - Sticky Note10

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 18 - Sticky Note11

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 19 - Sticky Note12

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 20 - Sticky Note13

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 21 - Sticky Note14

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 22 - Sticky Note15

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 23 - Sticky Note16

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 24 - Sticky Note17

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Showing the first 24 of 46 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Auto-generate & publish SEO articles to WordPress with GPT-4 + Postgres tracking
Complexity advanced
Nodes 46
Categories Content Creation, Multimodal AI
Author AlexWantMoreB
Published 06 May 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/3887/3887.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Auto-generate & publish SEO articles to WordPress with GPT-4 + Postgres tracking do?

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, C...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Content Creation, Multimodal AI use case.