# WordPress - AI chatbot to enhance user experience: n8n workflow

> Started by someone opening a chat with it, and works across Postgres, Supabase, Supabase vectors and WordPress.

Source: https://millionrounds.com/workflow/wordpress-ai-chatbot-to-enhance-user-experience (Millionrounds; every figure on the page links to its filing or article)

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

# WordPress - AI chatbot to enhance user experience

Started by someone opening a chat with it, and works across Postgres, Supabase, Supabase vectors and WordPress. It puts OpenAI behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 45 steps, 1 branch, 1 loop or waits: large, and worth reading before you trust it with anything live.

Large Calls a model: OpenAI Retrieval

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fwordpress-ai-chatbot-to-enhance-user-experience)

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

**1** Branch: places the flow splits

**1** Loop or waits

**4** Services it connects to

## The flow

Starts it 4 Model 13 Logic 17 Service 11

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

- 1 **When clicking ‘Test workflow’** Manual trigger *Starts it*
- 2 **Embeddings OpenAI** Embeddings Open Ai *Model*
- 3 **Token Splitter** Text Splitter Token Splitter *Model*
- 4 **Embeddings OpenAI1** Embeddings Open Ai *Model*
- 5 **OpenAI Chat Model** Lm Chat Open Ai *Model*
- 6 **Postgres Chat Memory** Memory Postgres Chat *Model*
- 7 **Embeddings OpenAI2** Embeddings Open Ai *Model*
- 8 **Token Splitter1** Text Splitter Token Splitter *Model*
- 9 **Every 30 seconds** Schedule trigger *Starts it*
- 10 **Postgres - Create documents table** Postgres *Service*
- 11 **When chat message received** Chat trigger *Starts it*
- 12 **Wordpress - Get all posts** Wordpress *Service*
- 13 **Wordpress - Get all pages** Wordpress *Service*
- 14 **Supabase Vector Store** Vector Store Supabase *Model*
- 15 **Default Data Loader** Document Default Data Loader *Model*
- 16 **Supabase - Retrieve documents from chatinput** Vector Store Supabase *Model*
- 17 **AI Agent** Agent *Model*
- 18 **Store documents on Supabase** Vector Store Supabase *Model*
- 19 **Default Data Loader1** Document Default Data Loader *Model*
- 20 **Postgres** Postgres *Service*
- 21 **Postgres - Create workflow execution history table** Postgres *Service*
- 22 **Merge Wordpress Posts and Pages** Merge *Logic*
- 23 **Aggregate** Aggregate *Logic*
- 24 **Aggregate documents** Aggregate *Logic*
- 25 **Respond to Webhook** Respond To Webhook *Starts it*
- 26 **Aggregate1** Aggregate *Logic*
- 27 **Wordpress - Get posts modified after last workflow execution** Http Request *Service*
- 28 **Wordpress - Get posts modified after last workflow execution1** Http Request *Service*
- 29 **Set fields1** Set *Logic*
- 30 **Supabase - Store workflow execution** Supabase *Service*
- 31 **Set fields** Set *Logic*
- 32 **Store workflow execution id and timestamptz** Supabase *Service*
- 33 **Merge retrieved WordPress posts and pages** Merge *Logic*
- 34 **Filter - Only published & unprotected content** Filter *Logic*
- 35 **Set fields2** Set *Logic*
- 36 **HTML To Markdown** Markdown *Logic*
- 37 **Filter - Only published and unprotected content** Filter *Logic*
- 38 **Loop Over Items** Split In Batches *Logic*
- 39 **Markdown1** Markdown *Logic*
- 40 **Postgres - Filter on existing documents** Postgres *Service*
- 41 **Switch** Switch *Logic*
- 42 **Supabase - Delete row if documents exists** Supabase *Service*
- 43 **Set fields4** Set *Logic*
- 44 **Aggregate2** Aggregate *Logic*
- 45 **Set fields3** Set *Logic*

## How it's built

- **Starts on:** Someone opening a chat with it
- **Steps:** 45, with 1 branch, 1 loop or waits
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Postgres, Supabase, Supabase vectors, WordPress
- **Model:** OpenAI
- **Retrieval:** Answers are drawn from documents you supply, not from the model alone

## Questions

What does it need to run?

An n8n account, plus your own Postgres, Supabase, Supabase vectors 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 someone opening a chat with it.

Does it use AI?

Yes. It calls OpenAI. Its answers draw on documents you give it, not on the model alone. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 45 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 45 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%2Fwordpress-ai-chatbot-to-enhance-user-experience)
- **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)[Supabase](https://millionrounds.com/workflows?service=Supabase#library)[Supabase vectors](https://millionrounds.com/workflows?service=Supabase+vectors#library)[WordPress](https://millionrounds.com/workflows?service=WordPress#library)

## Workflows like it

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

- [**Spotify to YouTube playlist synchronization with Discord** 45 steps · Discord, Supabase](https://millionrounds.com/workflow/spotify-to-youtube-playlist-synchronization-with-discord)
- [**Interactive knowledge base chat with Supabase RAG** 43 steps · calls a model · Gmail, Google Drive](https://millionrounds.com/workflow/interactive-knowledge-base-chat-with-supabase-rag)
- [**Multi-agent personal assistant orchestration with OpenAI** 49 steps · calls a model · Redis, Supabase](https://millionrounds.com/workflow/multi-agent-personal-assistant-orchestration-with-openai)
- [**Central AI agent of an IT company with Gemini and OpenRouter** 39 steps · calls a model · Google Drive, Pinecone](https://millionrounds.com/workflow/central-ai-agent-of-an-it-company-with-gemini-and-openrouter)
- [**Filter URLs with Gemini and Groq** 37 steps · calls a model · Postgres](https://millionrounds.com/workflow/filter-urls-with-gemini-and-groq)
- [**From sitemap crawling to vector storage: Creating an efficient** 35 steps · calls a model · Postgres, Supabase](https://millionrounds.com/workflow/from-sitemap-crawling-to-vector-storage-creating-an-efficien)
