WhatsApp RAG chatbot with Supabase, Gemini 2.5 Flash, and OpenAI embeddings
Ready for 3.0Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.
Nodes used (9)
- Supabase Vector Store
@n8n/n8n-nodes-langchain.vectorStoreSupabase - WhatsApp Trigger
n8n-nodes-base.whatsAppTrigger - Switch
n8n-nodes-base.switch - Default Data Loader
@n8n/n8n-nodes-langchain.documentDefaultDataLoader - Embeddings OpenAI
@n8n/n8n-nodes-langchain.embeddingsOpenAi - Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - AI Agent
@n8n/n8n-nodes-langchain.agent - WhatsApp Business Cloud
n8n-nodes-base.whatsApp - HTTP Request
n8n-nodes-base.httpRequest
What it does
WhatsApp RAG Chatbot with Supabase, Gemini 2.5 Flash, and OpenAI Embeddings This n8n template demonstrates how to build a WhatsApp-based AI chatbot that answers user questions using document retrieval (RAG) powered by Supabase for storage, OpenAI embeddings for semantic search, and Gemini 2.5 Flash LLM for generating high-quality responses. Use cases are many: Turn your WhatsApp into a knowledge assistant for FAQs, customer support, or internal company documents — all without coding. --- Good to know - The workflow uses OpenAI embeddings for both document embeddings and query embeddings, ensuring accurate semantic search. - Gemini 2.5 Flash LLM is used to generate user-friendly answers from the retrieved context. - Messages are processed in real-time and sent back directly to WhatsApp. - Workflow is modular — you can split document ingestion and query handling for large-scale setups. - Supabase and WhatsApp API credentials must be configured before running. --- How it works 1. Trigger: A new WhatsApp message triggers the workflow via webhook. 2. Message Check: Determines if the message is a query or a document upload. 3. Document Handling: - Fetch file URL from WhatsApp. - Convert binary to text. - Generate embeddings with OpenAI and store them in Supabase. 4. Query Handling: - Generate query embeddings with OpenAI. - Retrieve relevant context from Supabase. - Pass context to Gemini 2.5 Flash LLM to compose a response. 5. Response: Send the answer back to the user on WhatsApp. Optional: Add Gmail node to forward chat logs or daily summaries. --- How to use - Configure WhatsApp Business API webhook for incoming messages. - Add your Supabase and OpenAI credentials in n8n’s credentials manager. - Upload documents via WhatsApp to populate the Supabase vector store. - Ask queries — the bot retrieves context and answers using Gemini 2.5 Flash. --- Requirements - WhatsApp Business API (or Twilio WhatsApp Sandbox) - Supabase account (vector storage for embeddings) - OpenAI API key (for generating embeddings) - Gemini API access (for LLM responses) --- Customising this workflow - Swap WhatsApp with Telegram, Slack, or email for different chat channels. - Extend ingestion to other sources like Google Drive or Notion. - Adjust the number of retrieved documents or prompt style in Gemini for tone control. - Add a Gmail output node to send logs or alerts automatically.