AI WhatsApp support with human handoff using Gemini, Twilio, and Supabase RAG
Ready for 3.0What this workflow does
This AI workflow has 22 nodes and runs on Twilio events (com.twilio.messaging.inbound message.received) (plus 2 other triggers). Along the way it connects Twilio, Google Drive, Supabase Vector Store and Embeddings OpenAI and 3 more.
How it runs
Trigger: On Twilio events (com.twilio.messaging.inbound message.received) (plus 2 other triggers).
- human in the loop (HTTP Request): calls an HTTP API
- Set the fields for mapping (Edit Fields (Set)): sets 2 fields: file_id, file_name
- 2hour Filter (Filter): keeps only the items that match a condition
- Deletes old records (Supabase): delete
- Validate text input (If): checks a condition and branches into true / false
- Loop Over Items (Loop Over Items (Split in Batches)): loops over the items in batches
- Whatsapp Support Agent (AI Agent): runs an AI agent, with model: Google Gemini (the brain); 4 tools (Think, Calculator, Airtable CRM, Knowledgebase); memory: conversation buffer
- Download file (Google Drive): download
- Send an SMS/MMS/WhatsApp message (Twilio): uses Twilio
- Supabase Vector Store: stores documents in the Supabase vector store, with embeddings: Embeddings OpenAI; document loader: Default Data Loader
Services it uses
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (20)
- Twilio
n8n-nodes-base.twilio - Google Drive Trigger
n8n-nodes-base.googleDriveTrigger - Google Drive
n8n-nodes-base.googleDrive - Supabase Vector Store
@n8n/n8n-nodes-langchain.vectorStoreSupabase - Default Data Loader
@n8n/n8n-nodes-langchain.documentDefaultDataLoader - Recursive Character Text Splitter
@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - Embeddings OpenAI
@n8n/n8n-nodes-langchain.embeddingsOpenAi - Think Tool
@n8n/n8n-nodes-langchain.toolThink - Calculator
@n8n/n8n-nodes-langchain.toolCalculator - Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow - Supabase
n8n-nodes-base.supabase - Edit Fields (Set)
n8n-nodes-base.set - HTTP Request
n8n-nodes-base.httpRequest - If
n8n-nodes-base.if - Filter
n8n-nodes-base.filter - Twilio Trigger
n8n-nodes-base.twilioTrigger - Airtable Tool
n8n-nodes-base.airtableTool - AI Agent
@n8n/n8n-nodes-langchain.agent - Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini
From the author
Quick Overview What it is: An n8n workflow that enables AI-first WhatsApp support with seamless human handoff. Why it’s unique: The AI agent answers queries using RAG (Supabase vector store + Gemini). If a human intervenes, the AI steps down. If there’s no…