Build a RAG chatbot using Google Gemini and a Supabase vector store
Ready for 3.0What this workflow does
This AI workflow has 16 nodes and runs when a chat message arrives (plus 2 other triggers). Along the way it connects Google Gemini Chat Model, Postgres Chat Memory, Supabase Vector Store and Embeddings Google Gemini.
How it runs
Trigger: When a chat message arrives (plus 2 other triggers).
- Knowledge-Base AI Agent (AI Agent): runs an AI agent, with model: Google Gemini Chat Model; 1 tool (Supabase Retriever); memory: Persistent Chat History
- Parse File Size (Code): runs custom JavaScript code
- Format Error Alert (Edit Fields (Set)): sets 1 field: alertMessage
- File < 10MB? (If): checks a condition and branches into true / false
- Supabase Inserter (Supabase Vector Store): stores documents in the Supabase vector store, with embeddings: Gemini Embeddings; document loader: Document Parser
- Reject Upload (Stop and Error): stops the run with an error
- Success Response (Respond to Webhook): sends the response back to the webhook caller
Services it uses
Other Google Gemini + Supabase templates (66) · Other Supabase + PostgreSQL templates (60) · Other Google Gemini + PostgreSQL templates (47)
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 (15)
- Error Trigger
n8n-nodes-base.errorTrigger - Edit Fields (Set)
n8n-nodes-base.set - Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - Chat Trigger
@n8n/n8n-nodes-langchain.chatTrigger - AI Agent
@n8n/n8n-nodes-langchain.agent - Postgres Chat Memory
@n8n/n8n-nodes-langchain.memoryPostgresChat - Supabase Vector Store
@n8n/n8n-nodes-langchain.vectorStoreSupabase - n8n Form Trigger
n8n-nodes-base.formTrigger - If
n8n-nodes-base.if - Code
n8n-nodes-base.code - Stop and Error
n8n-nodes-base.stopAndError - Respond to Webhook
n8n-nodes-base.respondToWebhook - Default Data Loader
@n8n/n8n-nodes-langchain.documentDefaultDataLoader - Character Text Splitter
@n8n/n8n-nodes-langchain.textSplitterCharacterTextSplitter - Embeddings Google Gemini
@n8n/n8n-nodes-langchain.embeddingsGoogleGemini
From the author
🧠 AI Chatbot with RAG: Google Gemini & Supabase Vector Store 📌 Summary Build a custom, intelligent knowledge base in minutes. This n8n workflow provides a complete Retrieval-Augmented Generation (RAG) system using Google Gemini and Supabase. It features a…