Automate Business WhatsApp Support with n8n AI Chatbot

Struggling to manage customer queries on WhatsApp efficiently? This n8n workflow creates an AI-powered WhatsApp chatbot using Meta webhooks, OpenAI, and Qdrant vector search to deliver fast, accurate customer support for an electronics store.
respondToWebhook
agent
stickyNote
+12
Workflow Identifier: 1077
NODES in Use: respondToWebhook, agent, stickyNote, lmChatOpenAi, manualTrigger, vectorStoreQdrant, httpRequest, googleDrive, embeddingsOpenAi, documentDefaultDataLoader, textSplitterTokenSplitter, webhook, if, whatsApp, memoryBufferWindow

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 Alex, the owner of an electronics store who spends countless hours answering repetitive customer queries on WhatsApp. Every day, Alex receives dozens of messages asking about product details, troubleshooting advice, and orders. Manually responding has become overwhelming, leading to delayed replies, occasional errors, and lost sales opportunities worth hundreds of dollars weekly.

Alex needs a smarter way to handle WhatsApp customer messages without hiring extra staff or sacrificing response quality. This specific challenge—providing fast, accurate, and context-aware WhatsApp support for electronics products—is exactly what our custom n8n automation solves.

2. What This Automation Does

This unique n8n workflow listens to WhatsApp messages received via Meta’s webhook, processes the customer’s query with a conversational AI agent powered by OpenAI’s GPT-4, and references an indexed knowledge base of electronics documents using Qdrant vector search technology. Here’s what happens specifically when the workflow runs:

  • Webhook Verification & Listening: Set up Meta for Developers webhook to receive WhatsApp message events and verify connection.
  • Message Filtering: Only customer message events are processed, filtering out status updates or non-text events.
  • Document Retrieval: Loads product manuals and support docs from a designated Google Drive folder, converts to plain text, and uploads to a Qdrant vector store for semantic search.
  • AI Conversational Agent: The incoming WhatsApp query text is passed to a LangChain AI agent that uses OpenAI’s GPT-4o-mini model combined with a window buffer memory to provide conversational context-aware replies.
  • Response Dispatch: Replies are sent back directly to the customer’s WhatsApp number using the WhatsApp Business API node.
  • Fallback Messaging: If a message is not suitable for AI processing, a polite default text response is sent back, indicating only text is supported.

This workflow is designed specifically for an electronics store context with a customized system prompt for product info, troubleshooting, and customer service replies.
It saves Alex hours every day, improves customer satisfaction with instant, accurate answers, and scales without additional staff.

3. Prerequisites ⚙️

  • Meta for Developers account for WhatsApp Business API integration and webhook setup 🔌
  • Google Drive account with product/support documentation stored in a specific folder 📁
  • OpenAI account with API access for GPT-4o-mini model 🔑
  • Qdrant vector search API account and collection set up for document embeddings 🔐
  • n8n account with workflow creation and credential setup ⚙️ (self-hosting optional)
  • WhatsApp Business API credentials to send and receive WhatsApp messages 📧

4. Step-by-Step Guide

Step 1: Create Qdrant Collection

Navigate to the HTTP Request node named “Create collection” in n8n.

Set the method to POST and the URL to your Qdrant collection endpoint:
https://QDRANTURL/collections/COLLECTION

In the JSON body, include:
{ "filter": {} }

Set the header Content-Type: application/json and authenticate with your Qdrant API credentials.
Trigger this node manually or via the Manual Trigger node.

Expected outcome: An empty Qdrant collection is created to hold your vectors.

Common mistake: Ensure your QDRANTURL and COLLECTION name match your account’s settings exactly.

Step 2: Refresh the Qdrant Collection

After collection creation, use the Refresh collection HTTP Request node to delete any existing points.
Configure similarly to Step 1, with URL:
https://QDRANTURL/collections/COLLECTION/points/delete

Body:
{ "filter": {} }

Outcome: Collection is emptied, ready to accept new documents.

Step 3: Load Documents from Google Drive

Open the Get folder Google Drive node.

Set the Drive ID to “My Drive” and Folder ID to your specific folder containing your electronics documentation (e.g., “test-whatsapp”).

Trigger the node to fetch file metadata.

Next, use the Download Files Google Drive node linked to Get folder output.

Configure to download the file content and convert Google Docs to plain text.

Outcome: You now have raw document content to vectorize.

Step 4: Generate Embeddings

Use the Embeddings OpenAI node with OpenAI credentials.

Pass the downloaded plain text content to this node to generate vector embeddings.

Note: OpenAI’s embedding model is used for semantic search quality.

Step 5: Insert Vectors into Qdrant

Use the Qdrant Vector Store node in “insert” mode.

Connect the embeddings output here to upload vectors into your Qdrant collection for later retrieval.

Step 6: Set Up WhatsApp Webhook Verification

Configure the Verify webhook node with GET method and path matching Meta webhook settings.

Connect it to the Respond to Webhook node set to respond with the hub.challenge as required by Meta.

This ensures WhatsApp message webhook is verified to receive events.

Step 7: Handle Incoming WhatsApp Messages

The Respond webhook node listens to POST requests from Meta WhatsApp API.

Connect it to the is Message? IF node that checks for the presence of a message object (customer message).

Step 8: AI Agent Processing

If message exists, route to the AI Agent node.

This agent is configured with OpenAI Chat model (GPT-4o-mini) and a window buffer memory for conversational context.

The incoming message text is passed in, and the AI generates an informed reply based on the embedded knowledge base.

Step 9: Responding to the Customer

Connect the AI Agent output to the Send WhatsApp node.

This sends the generated text response directly to the customer’s WhatsApp number.

Step 10: Handle Non-Message Events

If the is Message? node detects no customer message, route to the Only message WhatsApp node.

This node sends a polite default reply indicating only text messages are supported.

5. Customizations ✏️

  • Modify AI Agent System Prompt: Edit the “AI Agent” node’s systemMessage parameter to fit your store’s tone or product focus.
  • Change Document Source Folder: In the “Get folder” node, update the folderId to any other Google Drive folder path hosting your documents.
  • Use Different OpenAI Model: Switch the “OpenAI Chat Model” node’s model from “gpt-4o-mini” to “gpt-4” or “gpt-3.5-turbo” for varied quality and cost.
  • Implement Additional Message Types: Expand the “is Message?” node’s logic to handle media types or templates if your business requires.
  • Setup Multi-Language Responses: Introduce language detection and dynamic system prompts to support multiple customer languages.

6. Troubleshooting 🔧

Problem: “Webhook verification failed”
Cause: The Verify webhook node must respond with the exact hub.challenge string to Meta’s GET verification call.
Solution: Ensure the “Respond to Webhook” node connected to Verify returns {{$json.query['hub.challenge']}} exactly, and webhook paths & methods match Meta app settings.

Problem: “No message data processed”
Cause: Incoming webhook JSON may lack the expected message object or the IF node condition mismatches.
Solution: Confirm the JSON structure from Meta matches the IF node’s path: body.entry[0].changes[0].value.messages[0]. Adjust if Meta updated the API.

Problem: “OpenAI API quota exceeded”
Cause: Frequent AI calls without quota throttle.
Solution: Monitor OpenAI usage on your account dashboard, consider upgrading or implementing rate limiting in n8n.

7. Pre-Production Checklist ✅

  • Verify Qdrant API credentials and test with manual HTTP requests.
  • Upload sample documents to Google Drive folder and confirm proper conversion.
  • Test Meta webhook verification using the Verify and Respond to webhook nodes.
  • Send test WhatsApp messages and confirm AI-generated responses reach the correct recipient.
  • Backup workflow configuration and API credentials securely.

8. Deployment Guide

Once tested, activate the workflow in n8n.

Ensure Meta webhook URLs are set as production callback URLs.

Monitor execution via n8n’s Dashboard and logs for errors or failed runs.

Schedule periodic refresh of Qdrant collection if new documents are added.

9. FAQs

Q: Can I use Google Drive files other than text documents?
A: Yes, but Google Docs must be converted to plain text, or PDFs should be processed similarly before embedding.

Q: Does this workflow consume OpenAI API credits?
A: Yes, each AI interaction uses OpenAI tokens; monitor accordingly.

Q: Is customer data safe?
A: Data flows securely via Meta and OpenAI APIs. For sensitive info, consider data privacy best practices and compliance.

10. Conclusion

By following this guide, you set up a powerful AI-driven WhatsApp chatbot tailored to your electronics store’s needs. You saved countless hours handling FAQs and raised customer satisfaction with fast, accurate help. This automation leverages n8n, OpenAI GPT-4, Qdrant vector search, and Google Drive for a seamless support experience.

Next, consider expanding to multi-channel support, integrating order management systems, or adding voice recognition to further enhance your customer service.

Keep experimenting, and enjoy your smarter business support!

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