Run a WhatsApp customer support chatbot with OpenWA, OpenAI and Qdrant
Quick overview This workflow builds a WhatsApp customer-support chatbot using OpenWA and OpenAI, enriched with Qdrant RAG knowledge and optional Gmail escalation to a human agent, plus a manual knowledge-base ingestion flow that loads documents from Google Drive and indexes them into Qdrant.
How it works Triggers when an incoming WhatsApp message is received via the OpenWA webhook. Checks whether the incoming message type is text and immediately replies via OpenWA if it is not. Extracts key message metadata (sender, chat ID, body, timestamp, session ID) and passes the text to an OpenAI-powered support agent with per-chat conversation memory. When needed, the agent uses a Qdrant-backed RAG tool (OpenAI embeddings + Qdrant vector search) and a calculator tool to answer accurately, and it can escalate by sending an email via Gmail. Cleans the agent’s reply text and sends the final response back to the WhatsApp chat via OpenWA. On the manual trigger, optionally creates/clears the Qdrant collection, downloads files from a specified Google Drive folder, converts/splits them into chunks, generates OpenAI embeddings, and inserts them into Qdrant for later retrieval.
Setup Set up OpenWA (self-hosted) and add the OpenWA API credentials in n8n, then configure the OpenWA webhook to point to the workflow’s OpenWA Trigger endpoint and set the correct session ID. Add an OpenAI API credential and select the chat model(s) and embeddings model used by the agent and Qdrant retrieval. Provision Qdrant, add Qdrant API credentials, create/update the target collection name in both the retrieval and insertion steps, and replace the QDRANTURL placeholders in the HTTP requests. Add Google Drive OAuth credentials, set the folder ID containing your knowledge-base documents, and run the manual ingestion flow to populate Qdrant. Add Gmail OAuth2 credentials and confirm the support email recipient address used for escalation.
Additional info MY NEW YOUTUBE CHANNEL 👉 Subscribe to my new YouTube channel. Here I'll share videos and Shorts with practical tutorials and FREE templates for n8n.
Need help customizing? Contact me for consulting and support or add me on Linkedin
Related Templates
AI Email Classifier & Auto-Delete for Gmail (SPAM/OFFER Cleaner)
This workflow is designed for freelancers, solopreneurs, and business owners who receive a high volume of irrelevant mes...
Generate Product Ad Copy & CTAs with GPT-4 for Slack and Airtable
⚡ AI Copywriter Pro: Instant Ad Copy & CTA Generator Transform product details into compelling marketing copy in second...
Generate Food Recipes from Gmail & Form Requests with Ollama & Llama 3.2
This n8n template demonstrates how to create an intelligent food recipe assistant that accepts requests via Gmail and we...
🔒 Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments