Block 1 - Supabase Vector Store
- Type / Role
- @n8n/n8n-nodes-langchain.vectorStoreSupabase - vectorStoreSupabase
- Config choices
- Version 1.3
This workflow is provided as-is. Please review and test before using in production.
WhatsApp RAG Agent (Text + Voice) with Weekly Google Drive Sync One line summary : Answers WhatsApp in under 100 words, understands voice notes, and retrieves trusted answers from your Google Drive...
@n8n/n8n-nodes-langchain.vectorstoresupabase, n8n-nodes-base.googledrivetrigger, n8n-nodes-base.set, n8n-nodes-base.googledrive, @n8n/n8n-nodes-langchain.embeddingsopenai, @n8n/n8n-nodes-langchain.documentdefaultdataloader, @n8n/n8n-nodes-langchain.textsplittercharactertextsplitter, n8n-nodes-base.stickynote
This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Basil Irfan.
Original n8n.io sourceOne-line summary : Answers WhatsApp in under 100 words, understands voice notes, and retrieves trusted answers from your Google Drive docs (RAG) kept fresh weekly.
WHATSAPP_APP_ID=
WHATSAPP_TOKEN=
WHATSAPP_PHONE_NUMBER_ID=
OPENAI_API_KEY=
COHERE_API_KEY=
SUPABASE_URL=
SUPABASE_ANON_KEY=
GDRIVE_FOLDER_ID=
RAG_TABLE_NAME="documents" # table to store vectors/metadata
MAX_ANSWER_WORDS=100 # guardrail for concise replies
Answer-time lane (RAG Tool):
Ingest lane (Weekly Sync): A) Detect Drive file updates → B) Download & convert (Docs → text/plain) → C) Chunk (size/overlap) → D) Embed with OpenAI → E) Upsert to Supabase with metadata & hashes.
| # | Node | Key Inputs | Key Outputs |
|---|---|---|---|
| 1 | WhatsApp Trigger | Incoming message | Raw WhatsApp payload |
| 2 | Switch (Attachment presence/type) | Payload | Route: Text or Audio |
| 3 | HTTP Request (Audio path) | attachments[0].data_url |
Audio file |
| 4 | OpenAI – Translate/ASR | Audio file | Transcribed text |
| 5 | Merge | Text path + Audio path | Unified text message |
| 6 | Simple Memory | Recent turns | Short-term context |
| 7 | OpenAI Chat Model | Prompt + message + memory | Draft answer (tool calls allowed) |
| 8 | Supabase Vector Tool (retrieve-as-tool) | Query text, topK=10 |
Candidate KB passages |
| 9 | Cohere Reranker | Candidates | Re-ranked context |
| 10 | Send WhatsApp Message | to, body |
Reply sent |
| 11 | Google Drive Trigger (weekly) | Folder ID, fileUpdated |
Changed files |
| 12 | Set (File Id) | id from trigger | File ref |
| 13 | Google Drive – Download File | Id (Docs→txt) | Raw text |
| 14 | Character Text Splitter | chunkSize=2000, overlap=300 |
Chunks |
| 15 | Default Data Loader | Binary→Document | Clean docs |
| 16 | OpenAI Embeddings (ingest) | Chunks | Vectors |
| 17 | Supabase Vector Store (insert) | Table: documents |
Upserted KB |
Notes
Import the workflow JSON.
Connect credentials: WhatsApp, OpenAI, Cohere, Supabase, Google Drive.
Google Drive Trigger: paste your Folder ID; keep fileUpdated event.
Download File: ensure Google Docs convert to text/plain.
Supabase Vector Store (insert): set table name to documents (or your schema).
Character Text Splitter: keep chunkSize=2000, overlap=300 (balanced recall/latency).
Retrieve-as-tool: set topK=10 and enable reranker.
Send WhatsApp Message mapping:
{{$("WhatsApp Trigger").item.json.messages[0].from}}{{$json.output}}Test:
System prompt:
MAX_ANSWER_WORDS).Temperature: start at 0.2 for factual replies.
Memory window: keep a short rolling buffer (e.g., last 4–6 turns).
Table documents (example columns):
id (uuid)source_url (text)title (text)chunk (text)embedding (vector/float[] depending on extension)chunk_hash (text)updated_at (timestamp)Indexes
chunk_hash to dedupeupdated_at for syncstopK and chunk sizes.topK=6–8 and chunkSize=1200 for speed.{{$json.output}} (Agent’s response property).attachments[0].data_url exists and HTTP node fetches a valid file.WhatsApp Trigger, Switch, HTTP Request, OpenAI (ASR + Chat + Embeddings), Merge, Simple Memory, Supabase Vector Tool (retrieve), Cohere Reranker, Google Drive Trigger, Set, Google Drive – Download, Character Text Splitter, Default Data Loader.
This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.
Showing the first 24 of 25 workflow blocks. Download the JSON for the full node graph.
| Workflow | WhatsApp support bot with Google Drive RAG, GPT-4.1-mini and Cohere reranking |
|---|---|
| Complexity | advanced |
| Nodes | 25 |
| Categories | Support Chatbot, AI RAG |
| Author | Basil Irfan |
| Published | 28 Sept 2025 |
Use the JSON export at /data/workflows/9043/9043.json as the source template for this automation.
Open n8n, import the downloaded JSON, and review each node before activating the workflow.
Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.
Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.
Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.
Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.
Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.
WhatsApp RAG Agent (Text + Voice) with Weekly Google Drive Sync One line summary : Answers WhatsApp in under 100 words, understands voice notes, and retrieves trusted answers from your Google Drive...
Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.
Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Support Chatbot, AI RAG use case.