# Build a WordPress RAG chatbot with OpenAI and Qdrant: n8n workflow

> Started by another system calling it, and works across Google Cloud Storage, Qdrant and WordPress.

Source: https://millionrounds.com/workflow/build-a-wordpress-rag-chatbot-with-openai-and-qdrant (Millionrounds; every figure on the page links to its filing or article)

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

# Build a WordPress RAG chatbot with OpenAI and Qdrant

Started by another system calling it, and works across Google Cloud Storage, Qdrant and WordPress. It puts OpenAI behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 44 steps, 1 branch: 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%2Fbuild-a-wordpress-rag-chatbot-with-openai-and-qdrant)

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

**1** Branch: places the flow splits

**0** Loops or waits

**3** Services it connects to

## The flow

Starts it 3 Model 23 Logic 14 Service 3

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

- 1 **Embeddings OpenAI** Embeddings Open Ai *Model*
- 2 **Recursive Character Text Splitter** Text Splitter Recursive Character Text Splitter *Model*
- 3 **Manual Indexing** Manual trigger *Starts it*
- 4 **Build context from Qdrant results1** Code *Logic*
- 5 **Webhook** Webhook *Starts it*
- 6 **Reranker Cohere** Reranker Cohere *Model*
- 7 **Structured Output Parser** Output Parser Structured *Model*
- 8 **OpenAI Chat Model** Lm Chat Open Ai *Model*
- 9 **Reranker Cohere3** Reranker Cohere *Model*
- 10 **Embeddings OpenAI3** Embeddings Open Ai *Model*
- 11 **Structured Output Parser3** Output Parser Structured *Model*
- 12 **OpenAI Chat Model3** Lm Chat Open Ai *Model*
- 13 **OpenAI Chat Model1** Lm Chat Open Ai *Model*
- 14 **Embeddings OpenAI4** Embeddings Open Ai *Model*
- 15 **Embeddings OpenAI5** Embeddings Open Ai *Model*
- 16 **Embeddings OpenAI1** Embeddings Open Ai *Model*
- 17 **Qdrant Vector Store1** Vector Store Qdrant *Model*
- 18 **Default Data Loader** Document Default Data Loader *Model*
- 19 **WP Get all post** Wordpress *Service*
- 20 **AI Agent** Agent *Model*
- 21 **Code-Request_Parsing** Code *Logic*
- 22 **Qdrant Search (Collection_name)** Vector Store Qdrant *Model*
- 23 **AI Agent3** Agent *Model*
- 24 **AI Agent - SKILLS** Agent *Model*
- 25 **MongoDB Atlas Vector SKILLS** Vector Store Mongo DBAtlas *Model*
- 26 **MongoDB Atlas Vector PROFILE** Vector Store Mongo DBAtlas *Model*
- 27 **Prepare Documents for Indexing** Code *Logic*
- 28 **Code-Response_Parsing** Code *Logic*
- 29 **OpenAI Intent Router** Open Ai *Model*
- 30 **Build context from Qdrant results** Code *Logic*
- 31 **url_en** Code *Logic*
- 32 **Code in JavaScript** Code *Logic*
- 33 **Code in JavaScript3** Code *Logic*
- 34 **Code: remove followup** Code *Logic*
- 35 **Switch** Switch *Logic*
- 36 **Respond to Webhook** Respond To Webhook *Starts it*
- 37 **SmallTalk Response** Open Ai *Model*
- 38 **Crypto: IP Hash** Crypto *Service*
- 39 **Code-Smalltalk_response** Code *Logic*
- 40 **Set: date** Set *Logic*
- 41 **set: ObjectName_Date/Folder & data** Set *Logic*
- 42 **Code: parsing** Code *Logic*
- 43 **GCS: Object_Log** Google Cloud Storage *Service*

## How it's built

- **Starts on:** Another system calling it
- **Steps:** 44, with 1 branch
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Google Cloud Storage, Qdrant, 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 Google Cloud Storage, Qdrant 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 another system calling 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 44 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 44 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%2Fbuild-a-wordpress-rag-chatbot-with-openai-and-qdrant)
- **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.

[Google Cloud Storage](https://millionrounds.com/workflows?service=Google+Cloud+Storage#library)[Qdrant](https://millionrounds.com/workflows?service=Qdrant#library)[WordPress](https://millionrounds.com/workflows?service=WordPress#library)

## Workflows like it

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

- [**ULTIMATE RAG - vectorization search system with OpenAI** 36 steps · calls a model · Qdrant](https://millionrounds.com/workflow/ultimate-rag-vectorization-search-system-with-openai)
- [**Bitrix24 AI-Powered RAG Chatbot for Open Line Channels** 33 steps · calls a model · Qdrant](https://millionrounds.com/workflow/bitrix24-ai-powered-rag-chatbot-for-open-line-channels)
- [**Adaptive RAG strategy with Gemini and Qdrant** 30 steps · calls a model · Qdrant](https://millionrounds.com/workflow/adaptive-rag-strategy-with-gemini-and-qdrant)
- [**Adaptive RAG with Gemini and Qdrant:** 30 steps · calls a model · Qdrant](https://millionrounds.com/workflow/adaptive-rag-with-gemini-and-qdrant)
- [**Create adaptive RAG chat agent with Gemini and Qdrant** 30 steps · calls a model · Qdrant](https://millionrounds.com/workflow/create-adaptive-rag-chat-agent-with-gemini-and-qdrant)
- [**Vision RAG and image embeddings with Cohere Command-A** 27 steps · calls a model · Qdrant](https://millionrounds.com/workflow/vision-rag-and-image-embeddings-with-cohere-command-a)
