πŸ’¬ Build a WordPress RAG chatbot with OpenAI, Qdrant or MongoDB

⚑ 29 views Β· πŸ’¬ Support Chatbots

Description

Wordpress AI Chatbot

Build a powerful, customizable AI chatbot for your WordPress website that intelligently retrieves posts, answers questions, and engages in natural conversations. This complete solution handles content indexing with OpenAI embeddings and vector storage (Qdrant or MongoDB), then powers a sophisticated chatbot interface that provides accurate, context-aware responses using RAG (Retrieval-Augmented Generation).

Two indexing options:

Complete package: Includes both indexing and chatbot workflows, WordPress plugin with customizable chat widget, and comprehensive step-by-step guides with screenshots.


What this workflow does

This complete solution provides content indexing and a customizable AI chatbot for your WordPress website:

Indexing Phase (Choose your path):

Option 1: Automated Qdrant indexing (Recommended):

  1. Retrieves all published posts from your WordPress site using the REST API
  2. Cleans and structures the content by extracting titles, URLs, post IDs, and slugs
  3. Splits text into intelligent chunks (1200 characters with 150-character overlap) for optimal embedding
  4. Generates vector embeddings using OpenAI’s text-embedding model (1536 dimensions)
  5. Stores vectors in Qdrant Cloud for fast similarity search and retrieval

Option 2: Advanced MongoDB indexing:

Chatbot Phase (Works with both indexing options):

Once indexed, your WordPress site features a fully customizable AI chatbot that:


Tools and services used

Core components:

n8n nodes included:


Use cases

Content websites & blogs

Business websites

Documentation sites

Portfolio sites

E-commerce


What’s included

When you purchase this complete pack, you receive:

Workflows (both included)

Both workflows work together as a complete AI chatbot solution

Documentation & guides

πŸ“š Clear and complete step-by-step guides included:

WordPress plugin

Additional files

Support:


Requirements

Essential services (all have free tiers):

Technical requirements:


Cost estimate

Indexing

For a typical small site (150 posts, indexed once):

ServiceInitial costMonthly costNotes
OpenAI Embeddings~$0.01-0.50$0One-time indexing cost
Qdrant Cloud$0$0Free tier: 1GB storage
n8n Self-hosted$0$0If self-hosted
n8n Cloud-$20If using n8n Cloud
TOTAL~$0.25$0-20Depends on n8n hosting choice

Re-indexing costs: Run this workflow whenever you publish new content or want to update the index. Each run costs only the OpenAI embedding fee (~$0.01-0.05 per 100 posts).

Chatbot usage costs

The chatbot workflow uses AI models to generate responses. Costs vary by provider and model.

Typical conversation: ~1000 tokens input (context + user query) + ~500 tokens output (AI response)

Cost per chat interaction - Monthly cost examples

Based on different traffic levels:

Monthly chatsGPT-4o-miniGemini FlashClaude HaikuGPT-4oClaude Sonnet
100$0.05$0.02$0.09$0.80$1.10
500$0.25$0.10$0.45$4.00$5.50
1,000$0.50$0.20$0.90$8.00$11.00
5,000$2.50$1.00$4.50$40.00$55.00
10,000$5.00$2.00$9.00$80.00$110.00

Note: Prices are approximate and based on January 2025 rates. Check current pricing at:


Setup time

Indexing:

Chatbot:

First-time users: 5-10 minutes

πŸ“š Complete guides included: All setup steps are documented with clear instructions and screenshots in the guides you receive after purchase.


How to use this workflow

πŸ“š Complete setup guides with screenshots are included with your purchase. Below is a quick overview:

Step 1: indexing workflow

Phase 1: Prepare services (10-15 min)

Phase 2: Import and configure workflow (5-10 min)

Phase 3: Run indexing (5-10 min)

Phase 4: Maintain index (ongoing)

Step 2: Deploy the chatbot workflow

After indexing is complete, follow these steps to activate your AI chatbot:

  1. Import the chatbot workflow (included in your purchase) into n8n
  2. Configure the webhook - The chatbot receives user queries via secure webhook
  3. Connect to your vector database - Point to the same Qdrant collection you just created
  4. Test the chatbot - Use the included test micro-website to verify AI responses
  5. Install the WordPress plugin - Upload and activate on your WordPress site
  6. Configure plugin settings - Add webhook URL, customize colors and appearance
  7. Add shortcode to pages - Place [wp_ai_chatbot] where you want the chat widget
  8. Go live - Your AI chatbot is now answering visitor questions using your content

How the chatbot works

When a visitor asks a question on your site:

  1. Question sent to n8n - WordPress plugin sends query to chatbot workflow via webhook
  2. Intent classification - AI determines if it’s SmallTalk, content question, or profile/skills query
  3. Vector search - For content questions, searches your indexed posts in Qdrant using semantic similarity
  4. Context retrieval - Fetches relevant content chunks with metadata (title, URL, post ID)
  5. AI response generation - Uses retrieved context to generate accurate, contextual answer
  6. Response delivered - Answer sent back to WordPress plugin and displayed in chat widget

Result: Visitors get instant, accurate answers based on your actual content, not generic AI responses.


Compatibility

Works with:

Tested on:


Common questions

Q: What exactly is included when I purchase? A: You get the complete package: both the indexing workflow (shown here) AND the chatbot workflow, the WordPress plugin with chat interface, comprehensive step-by-step setup guides with screenshots, configuration templates, email support, and 12 months of free updates. Everything you need to deploy a fully functional AI chatbot.

Q: Are the setup guides really clear and complete? A: Yes! Clear, detailed step-by-step guides are included with screenshots for every step. We provide both quick setup (15-25 min) and advanced setup paths, troubleshooting guides, customization instructions, and security best practices. Even beginners can follow along.

Q: Do I need to buy the chatbot workflow separately? A: No! Both workflows come together as a complete package. You get everything needed for a fully functional AI chatbot solution.

Q: How often should I run this workflow? A: Run it whenever you publish new content or want to update the index. For active blogs, weekly or after each batch of posts.

Q: Can I index custom post types? A: Yes. Modify the WordPress node to include custom post types in the query parameters.

Q: What if I have more than 1000 posts? A: The workflow handles pagination automatically. Larger sites may take longer to index and may exceed free tier limits.

Q: Is my content secure? A: Your content is sent to OpenAI for embedding generation and stored in Qdrant. Review privacy policies of both services.

Q: Can I use a different embedding model? A: Yes. Update the OpenAI node to use text-embedding-3-small or text-embedding-3-large (adjust vector dimensions accordingly).

Q: What’s the difference between Qdrant and MongoDB? A: Qdrant is easier to set up (15 min) and purpose-built for vectors. MongoDB Atlas is more flexible for complex data but takes longer to configure (1-2 hours).

Q: Do I need coding skills? A: No. If you can follow instructions, create API keys, and import workflows, you can set this up.

Q: Can I use this for multiple WordPress sites? A: Yes. Create separate collections in Qdrant for each site, or purchase additional licenses for commercial use.


Troubleshooting

β€œFailed to fetch posts from WordPress”

β€œOpenAI API authentication failed”

β€œQdrant collection not found”

β€œText too large” or chunking errors

Indexing takes too long


Complete WordPress AI chatbot solution

This is a complete, all-in-one package that includes everything you need:

βœ… What you get:

No hidden costs. No separate purchases needed. Everything included.


License & usage

Single site license:


Technical architecture

INDEXING FLOW
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                                                             β”‚
β”‚  1. Manual Trigger (or scheduled)                          β”‚
β”‚     ↓                                                       β”‚
β”‚  2. WordPress Node (Get all published posts)               β”‚
β”‚     ↓                                                       β”‚
β”‚  3. Prepare Documents (Extract & structure)                β”‚
β”‚     ↓                                                       β”‚
β”‚  4. Default Data Loader (Add metadata: title, URL, ID)     β”‚
β”‚     ↓                                                       β”‚
β”‚  5. Text Splitter (1200 chars, 150 overlap)                β”‚
β”‚     ↓                                                       β”‚
β”‚  6. OpenAI Embeddings (Generate 1536d vectors)             β”‚
β”‚     ↓                                                       β”‚
β”‚  7. Qdrant Vector Store (Insert mode)                      β”‚
β”‚     ↓                                                       β”‚
β”‚  βœ“ Content indexed and searchable                          β”‚
β”‚                                                             β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Data flow:

  1. Raw WordPress posts (JSON)
  2. Cleaned content with metadata
  3. Text chunks (1200 chars each)
  4. Vector embeddings (1536 dimensions)
  5. Stored in Qdrant with metadata

Updates & changelog

Version included: 1.0.0

Changelog:

Planned features:


About the author

Built by Paolo Ronco, automation specialist and n8n workflow developer.

More workflows:


Get started today

Ready to make your WordPress content semantically searchable?

  1. Purchase the complete pack - Receive both workflows, WordPress plugin, and all guides
  2. Follow the step-by-step guides - Clear instructions with screenshots included
  3. Import workflows into n8n (5 minutes)
  4. Configure credentials (10 minutes) - Guides show you exactly how
  5. Run indexing (5 minutes)
  6. Deploy chatbot (10 minutes) - Install WordPress plugin and go live
  7. Start answering user questions with AI-powered responses

πŸš€ Transform your WordPress content into an intelligent, searchable knowledge base.

πŸ“š Everything you need is included: Complete documentation, both workflows, WordPress plugin, and email support.


Β© 2026 Paolo Ronco. All rights reserved.

This workflow is provided as-is for use with n8n. OpenAI, WordPress, and Qdrant are trademarks of their respective owners.

πŸ”— Nodes Used

Webhook, Wordpress, Google Cloud Storage, AI Agent, Embeddings OpenAI, OpenAI Chat Model

πŸ“₯ Import

Download workflow.json and import into n8n: Workflow menu β†’ Import from File

πŸ“– Importing guide Β· πŸ”‘ Credential setup