Build a Business WhatsApp AI RAG Chatbot with OpenAI & Qdrant
detail.loadingPreview
Automate customer service with a WhatsApp AI RAG chatbot. Integrates OpenAI, Qdrant, and Google Drive for intelligent responses. Save hours weekly!
🚀Ready to Deploy This Workflow?
About This Workflow
How it works
This n8n workflow creates a sophisticated AI-powered chatbot for Business WhatsApp. It leverages a Retrieval-Augmented Generation (RAG) approach to provide intelligent and context-aware responses.
The workflow begins by setting up a Qdrant collection and clearing existing data, preparing it for new information.
It then accesses your Google Drive to retrieve documents from a specified folder ('test-whatsapp'). These documents are downloaded, converted to plain text, and then processed.
The core RAG process involves:
- Document Loading: Loading files from Google Drive.
- Text Splitting: Tokenizing the documents into manageable chunks using
Token Splitter. - Embeddings: Generating vector embeddings for these chunks using
Embeddings OpenAI. - Vector Storage: Storing these embeddings in Qdrant using
Qdrant Vector Store.
When a message is received via a WhatsApp webhook (Respond node), the workflow checks if it's a user message. If it is, the message is sent to the AI Agent node.
The AI Agent node, configured with OpenAI Chat Model (GPT-4o-mini) and a detailed system prompt, retrieves relevant information from the Qdrant vector store (acting as the knowledge base) and generates a response. Window Buffer Memory helps maintain conversation context.
Finally, the generated response is sent back to the user via WhatsApp using the Send node.
Key Features
- Real-time WhatsApp Chatbot powered by AI.
- Advanced Retrieval-Augmented Generation (RAG) for accurate responses.
- Integrates with OpenAI for natural language understanding and generation.
- Utilizes Qdrant as a vector database for efficient knowledge retrieval.
- Connects to Google Drive to ingest custom knowledge bases.
- Customizable system prompt for tailored chatbot behavior.
- Maintains conversation history with memory buffering.
How To Use
- Configure Qdrant: Update
QDRANTURLandCOLLECTIONin theCreate collection(node1538c8b1-f914-4991-b311-e533df625c5f) andRefresh collection(node423b73a6-2497-4635-9ad0-9e768f32018d) nodes. - Set up Google Drive: Ensure your Google Drive account is connected and the
Get folder(node9519866a-f28a-495a-9cb4-3b2170407943) node points to the correctfolderId(e.g., 'test-whatsapp') containing your knowledge base documents. - Configure OpenAI: Connect your OpenAI API account in the
OpenAI Chat ModelandEmbeddings OpenAInodes. - Configure Qdrant Credentials: Set up your Qdrant API credentials in the
Qdrant Vector Storenode. - Configure WhatsApp: Connect your WhatsApp API account in the
Only messageandSendnodes, ensuring thephoneNumberIdis correct. - Set Webhook URL: Configure your WhatsApp webhook in Meta for Developers to point to the URL provided by the
Verify(nodeec013e0c-a354-4f12-8ded-97013bb8fb21) andRespond(node253ddc93-5693-4362-aa6c-a80ab3f6df82) nodes. Important: TheVerifynode expects a GET request, and theRespondnode expects a POST request to the same webhook URL. - Tune AI Agent: Customize the
System Messagein theAI Agentnode (nodecc230fcd-f88c-40d4-8835-ac9dc6228b18) to define your chatbot's persona and behavior. AdjustchunkSizeandchunkOverlapin theToken Splitternode (node72591129-1691-4caf-bf63-c04db85708dc) as needed. - Activate Workflow: Enable the workflow in n8n.
Apps Used
Workflow JSON
{
"id": "09aeea15-1d5f-4772-93e0-adf817fc0b99",
"name": "Build a Business WhatsApp AI RAG Chatbot with OpenAI & Qdrant",
"nodes": 0,
"category": "AI & LLM",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: 09aeea15-1d5f...
About the Author
Free n8n Workflows Official
System Admin
The official repository for verified enterprise-grade workflows.
Statistics
Related Integrations
- Google Sheets + Schedule Trigger(394 workflows)
- Google Sheets + Split Out(277 workflows)
- Gmail + Schedule Trigger(270 workflows)
- Google Sheets + Slack(268 workflows)
- Gmail + Google Sheets(245 workflows)
- Google Drive + Google Sheets(203 workflows)
- Form Trigger + Google Sheets(163 workflows)
- Google Drive + Google Drive Trigger(135 workflows)
- Google Drive + Split Out(134 workflows)
- Gmail + Split Out(132 workflows)
Related Workflows
Discover more workflows you might like
Build a Telegram AI Chatbot with Multi-Format Input & OpenAI
Create a powerful Telegram AI chatbot that handles text & voice messages. Leverages OpenAI GPT-4o and Langchain for intelligent responses. Automate conversations effortlessly.
Build an AI Travel Assistant with Google Drive & OpenAI
Create a custom OpenAI AI Assistant that leverages your Google Drive documents for travel planning. Automate travel advice and responses.
Dynamically Generate HTML Pages with OpenAI Structured Output & Tailwind
Instantly create custom HTML pages using OpenAI's structured output and Tailwind CSS. Ideal for developers and growth hackers seeking rapid UI generation.
AI-Powered WordPress Post Creation: Keywords to Draft Article & Featured Image
Automate WordPress post creation. Input keywords, generate AI content, draft articles, and add featured images with DALL-E. Boost your content workflow instantly.
DeepSeek AI Agent: Build Long-Term Memory Telegram Bots with OpenAI API
Automate Telegram bots with DeepSeek AI, OpenAI API, and long-term memory. Build intelligent agents that learn and personalize interactions.
Auto-Transcribe YouTube Videos to Text with Supadata & OpenAI
Instantly get transcribed text from YouTube videos using Supadata API and OpenAI for structuring. Save hours on content review.