# Add internal links to WordPress posts with OpenAI and Notion: n8n workflow

> Started by a clock, and works across Notion, Slack and WordPress. It hands the judgement calls to OpenAI.

Source: https://millionrounds.com/workflow/add-internal-links-to-wordpress-posts-with-openai-and-notion (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)

# Add internal links to WordPress posts with OpenAI and Notion

Started by a clock, and works across Notion, Slack and WordPress. It hands the judgement calls to OpenAI. 17 steps, 3 branches, 1 loop or waits: a working afternoon to understand properly.

Medium Calls a model: OpenAI

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fadd-internal-links-to-wordpress-posts-with-openai-and-notion)

**17 steps** Medium: a working afternoon

**3** Branches: places the flow splits

**1** Loop or waits

**3** Services it connects to

## The flow

Starts it 2 Model 1 Logic 8 Service 6

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

- 1 **Manual Trigger** Manual trigger *Starts it*
- 2 **Weekly Monday 9AM** Schedule trigger *Starts it*
- 3 **Configuration** Code *Logic*
- 4 **Fetch All Posts** Wordpress *Service*
- 5 **Extract Post Data** Code *Logic*
- 6 **Loop Embeddings** Split In Batches *Logic*
- 7 **OpenAI Embeddings** Http Request *Service*
- 8 **Build Link Graph** Code *Logic*
- 9 **Has Suggestions?** If *Logic*
- 10 **Pick Anchor Text** Open Ai *Model*
- 11 **Build Update Payload** Code *Logic*
- 12 **Update WP Post** Wordpress *Service*
- 13 **Log Link Updates** Notion *Service*
- 14 **Is Orphan?** If *Logic*
- 15 **Orphan Page Alert** Slack *Service*
- 16 **Hub Candidate?** If *Logic*
- 17 **Hub Candidate Alert** Slack *Service*

## How it's built

- **Starts on:** A clock
- **Steps:** 17, with 3 branches, 1 loop or waits
- **Size:** Medium: a working afternoon
- **Connects to:** Notion, Slack, WordPress
- **Model:** OpenAI

## Questions

What does it need to run?

An n8n account, plus your own Notion, Slack and WordPress accounts, 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?

Plan an afternoon. 17 steps is enough that you should read each one before running it.

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 17 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%2Fadd-internal-links-to-wordpress-posts-with-openai-and-notion)
- **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.

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

## Workflows like it

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

- [**AI-newsletter-agent: automate newsletter generation for Mautic** 17 steps · calls a model · Google Sheets, Telegram](https://millionrounds.com/workflow/ai-newsletter-agent-automate-newsletter-generation-for-mauti)
- [**Automate SEO content creation with Google SERP and Claude** 17 steps · calls a model · Google Sheets, WordPress](https://millionrounds.com/workflow/automate-seo-content-creation-with-google-serp-and-claude)
- [**Create daily AI and blockchain social posts with SerpAPI** 17 steps · calls a model · Google Drive, Google Sheets](https://millionrounds.com/workflow/create-daily-ai-and-blockchain-social-posts-with-serpapi)
- [**Daily space image gallery with Google Drive** 17 steps · calls a model · Google Drive, Slack](https://millionrounds.com/workflow/daily-space-image-gallery-with-google-drive)
- [**Generate multilingual audio content with OpenAI and ElevenLabs** 17 steps · calls a model · Google Drive, Slack](https://millionrounds.com/workflow/generate-multilingual-audio-content-with-openai-and-elevenla)
- [**Generate, save, and log AI-written posts** 17 steps · calls a model · Google Docs, Notion](https://millionrounds.com/workflow/generate-save-and-log-ai-written-posts)
