Create a Business WhatsApp AI Chatbot with n8n and Qdrant

Struggling to handle customer questions efficiently on WhatsApp? This unique n8n workflow integrates WhatsApp Business API with OpenAI and Qdrant to automate precise AI responses using your own knowledge base. Save hours and improve customer support accuracy with this powerful AI chatbot setup.
agent
webhook
whatsApp
+10
Workflow Identifier: 1305
NODES in Use: respondToWebhook, webhook, if, whatsApp, httpRequest, googleDrive, embeddingsOpenAi, vectorStoreQdrant, lmChatOpenAi, agent, memoryBufferWindow, stickyNote, manualTrigger

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

Visit through Desktop for Best experience

1. Opening Problem Statement

Meet Sarah, the owner of an electronics store. Every day, Sarah’s WhatsApp Business account floods with questions — product details, troubleshooting requests, order inquiries — sometimes hundreds of them. Managing all these conversations manually is overwhelming and error-prone. Important customer messages are missed or answered late, costing Sarah potential sales and damaging her store’s reputation. She knows automation could help but struggles to find an easy, reliable method to build a smart WhatsApp AI assistant that truly understands her business knowledge.

This is exactly where the “Business WhatsApp AI RAG Chatbot” workflow in n8n shines. It transforms Sarah’s WhatsApp messages into intelligent AI-powered responses by harnessing her existing company knowledge neatly embedded into a vector database. This cuts Sarah’s response time drastically — from hours to seconds — while personalizing support for every customer inquiry.

2. What This Automation Does ⚙️

When a user sends a message to Sarah’s WhatsApp business number, this workflow activates and does the following:

  • Receives and verifies incoming WhatsApp webhook messages using Meta’s API.
  • Checks if the incoming payload is a text message and processes only those messages.
  • Extracts and vectorizes company documents stored in Google Drive into Qdrant’s vector database for efficient AI lookups.
  • Leverages OpenAI embeddings and chat models to create a conversational AI agent tailored to Sarah’s electronics store, using a Retrieval-Augmented Generation (RAG) system.
  • Maintains a memory buffer to hold conversation context, enabling more natural and relevant dialogues.
  • Sends personalized AI-generated replies directly back through WhatsApp to the customer.

This results in answering complex questions about products, technical support, pricing, and order processes automatically and professionally. Sarah saves hours daily, reduces manual errors, and boosts customer satisfaction significantly.

3. Prerequisites ⚙️

  • n8n account (Cloud or self-hosted) 🔌
  • WhatsApp Business API account with Meta Developer app configured 📱
  • OpenAI API account for GPT embeddings and chat models 🔐
  • Qdrant vector database access for knowledge vectorization (cloud or self-hosted) 📊
  • Google Drive account containing company documents (support guides, product info) 📁

4. Step-by-Step Guide ✏️

Step 1: Create a Qdrant Vector Collection

Navigate to the Create collection HTTP Request node and configure the following:

  • Set method to POST.
  • Enter your Qdrant endpoint URL replacing QDRANTURL in the node URL parameter.
  • Set the collection name to your business collection (e.g., COLLECTION in the URL).
  • Include { "filter": {} } as the JSON body.
  • Use proper authentication headers for your Qdrant API.

This initializes your vector space to store embedded business knowledge.

Common mistake: Forgetting to update QDRANTURL and COLLECTION with your actual values causes the collection creation to fail.

Step 2: Import Company Documents from Google Drive

Use the Get folder node (Google Drive) with your Drive folder ID containing all business documents:

  • Set the drive ID to “My Drive”.
  • Enter the specific folder ID that includes support FAQs, manuals, specs, etc.

Follow with the Download Files node to pull documents as plain text for processing.

Visual: You should see the downloaded files in the node output panel.

Common mistake: Missing the folder ID or permissions to Google Drive files will halt the process.

Step 3: Vectorize Documents with OpenAI Embeddings and Qdrant

Documents pass through the Default Data Loader (loads binary data) into the Embeddings OpenAI node:

  • The OpenAI node creates embeddings for each document chunk.
  • Next, the Qdrant Vector Store node inserts embeddings into your collection.

Technical note: The document is split into chunks via the Token Splitter node (chunk size 300, overlap 30) to optimize embedding relevance.

Common mistake: Not splitting documents leads to reduced retrieval accuracy or API timeouts.

Step 4: Configure WhatsApp Verification and Response Webhooks

Set up two webhook nodes named Verify and Respond with the same path, but different HTTP methods:

  • Verify: HTTP GET method to handle Meta verification challenge and respond with the challenge token.
  • Respond: HTTP POST method to receive incoming WhatsApp messages.

Common mistake: Using different paths or HTTP methods breaks webhook verification.

Step 5: Filter Incoming Messages

Add an If node labeled is Message? to check if incoming JSON payload contains a WhatsApp text message under body.entry[0].changes[0].value.messages[0].

If true, route to the next node to process the message; if false, send a generic “You can only send text messages” via the Only message WhatsApp node.

Step 6: Process Message with AI Agent

Use the AI Agent LangChain node configured with a custom system prompt that makes the AI behave as an expert electronics store assistant:

  • Input the user message text extracted from the webhook JSON.
  • Use the OpenAI chat model gpt-4o-mini for generating responses.
  • Connect buffer memory node Window Buffer Memory to hold conversation context for better dialogue flow.
  • The RAG node retrieves relevant company knowledge from Qdrant using embedded vectors.

This combination ensures accurate, context-aware AI replies.

Step 7: Send AI Responses Back to WhatsApp

The final response from the AI Agent is routed to the Send WhatsApp node, which sends the text back to the user’s WhatsApp number extracted from the webhook payload.

Expected outcome: Customers receive instant, personalized support messages via WhatsApp without manual intervention.

5. Customizations ✏️

  • Change AI Personality: Edit the AI Agent node’s systemMessage parameter to adjust tone and style (e.g., more casual or formal).
  • Add Multimedia Support: Extend WhatsApp nodes to handle images or documents by changing the operation from “send text” to “send media” and adding media URLs.
  • Expand Knowledge Base: Add more Google Drive folders or integrate other cloud storage to enhance your vector database.
  • Auto-update Knowledge: Schedule the Refresh collection node to regularly clear and re-import documents in case of new updates.
  • Multi-language Support: Modify the AI prompt and use multi-language models in OpenAI to cater to different customer languages.

6. Troubleshooting 🔧

Problem: “Webhook verification failed”

Cause: The Verify webhook node does not return the correct challenge token on HTTP GET requests.

Solution: Double-check the Respond to Webhook node connected to Verify returns {{ $json.query['hub.challenge'] }} as plain text response exactly as Meta requires.

Problem: “No message node detected” or “Message payload missing”

Cause: Incoming request does not contain WhatsApp message data.

Solution: Ensure your WhatsApp webhook is configured to subscribe to messages and the If node checks for value.messages[0] exists correctly.

Problem: “Qdrant insertion failure” or “Embedding errors”

Cause: API keys or collection names misconfigured in the Qdrant or OpenAI nodes.

Solution: Confirm your Qdrant API credentials and collection names match exactly. Test embedding nodes independently to verify connectivity.

7. Pre-Production Checklist ✅

  • Confirm Qdrant collection creation works via manual trigger test.
  • Check Google Drive folder access and file download permissions.
  • Test webhook URLs with Meta App developer console for verification success.
  • Send test WhatsApp messages to verify message detection and AI response.
  • Monitor OpenAI API usage to avoid quota limits.
  • Backup your n8n workflow configuration before live deployment.

8. Deployment Guide

Activate the workflow in n8n and ensure the Verify and Respond webhook URLs are properly configured in your Meta Developer App. Monitor webhook logs in n8n for errors.

Use n8n cloud or self-host on your server for production stability. For self-hosting, check out https://buldrr.com/hostinger for easy n8n install options.

9. FAQs

Q: Can I replace Qdrant with another vector database?

A: Yes, if you have nodes or APIs compatible with other vector stores like Pinecone or Weaviate, you can adapt the data insertion and retrieval steps similarly.

Q: Does this workflow consume a lot of OpenAI API credits?

A: It depends on message volume and document size but embedding and GPT calls can add up. Monitor usage and optimize document chunk sizes.

Q: Is customer data secure?

A: Yes, this workflow only processes WhatsApp messages and company knowledge locally. Ensure API keys are kept private and your n8n instance is securely hosted.

Q: Can this handle large volumes of messages?

A: Yes, with appropriate n8n and cloud infrastructure scaling, this setup can support high message throughput.

10. Conclusion

By building this “Business WhatsApp AI RAG Chatbot” workflow, you’ve empowered Sarah’s electronics store to handle customer inquiries swiftly and accurately. This automation saves countless hours each week, minimizes manual effort, and elevates customer service quality. With the solid foundation of WhatsApp, OpenAI, and Qdrant integration, you can extend this bot further — adding multilingual support, multimedia messaging, or linking order management systems for end-to-end automation. Let this be the first step in transforming how your business engages customers on WhatsApp!

Start implementing this unique AI chatbot today and experience the difference in customer interaction and operational efficiency.

Promoted by BULDRR AI

Related Workflows

Automate Viral UGC Video Creation Using n8n + Degaus (Beginner-Friendly Guide)

Learn how to automate viral UGC video creation using n8n, AI prompts, and Degaus. This beginner-friendly guide shows how to import, configure, and run the workflow without technical complexity.
Form Trigger
Google Sheets
Gmail
+37
Free

AI SEO Blog Writer Automation in n8n (Beginner Guide)

A complete beginner guide to building an AI-powered SEO blog writer automation using n8n.
AI Agent
Google Sheets
httpRequest
+5
Free

Automate CrowdStrike Alerts with VirusTotal, Jira & Slack

This workflow automates processing of CrowdStrike detections by enriching threat data via VirusTotal, creating Jira tickets for incident tracking, and notifying teams on Slack for quick response. Save hours daily by transforming complex threat data into actionable alerts effortlessly.
scheduleTrigger
httpRequest
jira
+5
Free

Automate Telegram Invoices to Notion with AI Summaries & Reports

Save hours on financial tracking by automating invoice extraction from Telegram photos to Notion using Google Gemini AI. This workflow extracts data, records transactions, and generates detailed spending reports with charts sent on schedule via Telegram.
lmChatGoogleGemini
telegramTrigger
notion
+9
Free

Automate Email Replies with n8n and AI-Powered Summarization

Save hours managing your inbox with this n8n workflow that uses IMAP email triggers, AI summarization, and vector search to draft concise replies requiring minimal review. Automate business email processing efficiently with AI guidance and Gmail integration.
emailReadImap
vectorStoreQdrant
emailSend
+12
Free

Automate Email Campaigns Using n8n with Gmail & Google Sheets

This n8n workflow automates personalized email outreach campaigns by integrating Gmail and Google Sheets, saving hours of manual follow-up work and reducing errors in email sequences. It ensures timely follow-ups based on previous email interactions, optimizing communication efficiency.
googleSheets
gmail
code
+5
Free