# Auto-generate & publish SEO articles to WordPress with OpenAI: n8n workflow

> Started by a clock, and works across Postgres. It hands the judgement calls to OpenAI. 23 steps: large, and worth reading before you trust it with anything...

Source: https://millionrounds.com/workflow/auto-generate-and-publish-seo-articles-to-wordpress-with-ope (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Content](https://millionrounds.com/workflows?category=Content#library)

# Auto-generate & publish SEO articles to WordPress with OpenAI

Started by a clock, and works across Postgres. It hands the judgement calls to OpenAI. 23 steps: large, and worth reading before you trust it with anything live.

Large Calls a model: OpenAI

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fauto-generate-and-publish-seo-articles-to-wordpress-with-ope)

**23 steps** Large: read it before trusting it with anything live

**0** Branches: places the flow splits

**0** Loops or waits

**1** Service it connects to

## The flow

Starts it 1 Model 4 Logic 11 Service 7

The steps in the order they run, from what starts it.

- 1 **Schedule Trigger** Schedule trigger *Starts it*
- 2 **OpenAI Chat Model** Lm Chat Open Ai *Model*
- 3 **OpenAI Chat Model1** Lm Chat Open Ai *Model*
- 4 **Config** Set *Logic*
- 5 **AI Agent SEO writer** Agent *Model*
- 6 **AI Agent SEO Headings** Agent *Model*
- 7 **Load Categories** Http Request *Service*
- 8 **Placeholder creator** Code *Logic*
- 9 **Extracting output** Code *Logic*
- 10 **New article title** Code *Logic*
- 11 **Category Filter** Code *Logic*
- 12 **Download Image** Http Request *Service*
- 13 **Merge** Merge *Logic*
- 14 **Merge heading** Merge *Logic*
- 15 **Selecting recent** Postgres *Service*
- 16 **Media Upload to WP** Http Request *Service*
- 17 **Prepare Post JSON** Code *Logic*
- 18 **Combines full post meta** Code *Logic*
- 19 **Picks Less Used** Code *Logic*
- 20 **Post to WP** Http Request *Service*
- 21 **Updating posts DB** Postgres *Service*
- 22 **10 latest headlines** Postgres *Service*
- 23 **No Operation, do nothing** No Op *Logic*

## How it's built

- **Starts on:** A clock
- **Steps:** 23
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Postgres
- **Model:** OpenAI

## Questions

What does it need to run?

An n8n account, plus your own Postgres account, and a key for OpenAI. You connect your own accounts after importing it; none are included.

What starts it?

It starts on a clock.

Does it use AI?

Yes. It calls OpenAI. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 23 steps it is large: read it before trusting it with anything live.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

**Before you run it**

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 23 steps before you point it at anything that matters.

## Run it in n8n

- **Create your n8n account** Free to start. n8n is where the workflow runs. [Create an n8n account ↗](https://millionrounds.com/n8n)
- **Download the workflow** Free with a Millionrounds account. [Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fauto-generate-and-publish-seo-articles-to-wordpress-with-ope)
- **Paste it into n8n** Open a new workflow in n8n and paste. Then connect your own accounts.

Stored with the author's traces removed: canvas notes, instance identifiers, saved credential names and any live document they had left behind.

## Connects to

Each opens the other workflows that use it.

[Postgres](https://millionrounds.com/workflows?service=Postgres#library)

## Workflows like it

Also content, with the same services where possible, closest in size first.

- [**Email assistant: convert natural language to SQL queries** 23 steps · calls a model · Postgres](https://millionrounds.com/workflow/email-assistant-convert-natural-language-to-sql-queries)
- [**Automate blog-to-social media with OpenAI and Reddit** 24 steps · calls a model · LinkedIn, Postgres](https://millionrounds.com/workflow/automate-blog-to-social-media-with-openai-and-reddit)
- [**Generate Gmail reply drafts with OpenAI and Postgres** 22 steps · calls a model · Gmail, Postgres](https://millionrounds.com/workflow/generate-gmail-reply-drafts-with-openai-and-postgres)
- [**Collect WhatsApp questionnaire responses in Postgres** 22 steps · Postgres, WhatsApp](https://millionrounds.com/workflow/collect-whatsapp-questionnaire-responses-in-postgres)
- [**Viral content opportunities from Twitter, Reddit** 24 steps · Email, Postgres](https://millionrounds.com/workflow/viral-content-opportunities-from-twitter-reddit)
- [**Gate pgvector indexing by checking consent in Postgres** 21 steps · calls a model · Postgres, Slack](https://millionrounds.com/workflow/gate-pgvector-indexing-by-checking-consent-in-postgres)
