Smarter RAG agents with enriched retrieval and modular workflows
Ready for 3.0What this workflow does
This AI workflow has 24 nodes and runs when a chat message arrives (plus 2 other triggers). Along the way it connects Supabase, Supabase Vector Store, Embeddings Google Gemini and Google Gemini and 3 more.
How it runs
Trigger: When a chat message arrives (plus 2 other triggers).
- Query Builder (Google Gemini): uses Google Gemini
- Extract from File: extracts data from a file (pdf)
- Get many rows (Supabase): get many
- RAG Agent (AI Agent): runs an AI agent, with model: Google Gemini 2.0 Flash; 1 tool (Supabase Vector Store); memory: Postgres Chat Memory
- Set File Data (Edit Fields (Set)): sets 4 fields: doc_id, doc_title, doc_type…
- Loop Over Items (Loop Over Items (Split in Batches)): loops over the items in batches
- Delete Old Doc Rows (Supabase): delete
- Merge: merges the data from its input branches
- Edit Fields (Edit Fields (Set)): sets 1 field: row_id
- Insert into Supabase Vectorstore (Supabase Vector Store): stores documents in the Supabase vector store, with embeddings: Embeddings Google Gemini; document loader: Default Data Loader
…plus 3 more steps. See the full node list below.
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 (18)
- Default Data Loader
@n8n/n8n-nodes-langchain.documentDefaultDataLoader - Recursive Character Text Splitter
@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter - Supabase
n8n-nodes-base.supabase - Chat Trigger
@n8n/n8n-nodes-langchain.chatTrigger - Supabase Vector Store
@n8n/n8n-nodes-langchain.vectorStoreSupabase - Embeddings Google Gemini
@n8n/n8n-nodes-langchain.embeddingsGoogleGemini - n8n Form Trigger
n8n-nodes-base.formTrigger - Extract from File
n8n-nodes-base.extractFromFile - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - Merge
n8n-nodes-base.merge - Wait
n8n-nodes-base.wait - Edit Fields (Set)
n8n-nodes-base.set - Google Gemini
@n8n/n8n-nodes-langchain.googleGemini - Schedule Trigger
n8n-nodes-base.scheduleTrigger - AI Agent
@n8n/n8n-nodes-langchain.agent - Reranker Cohere
@n8n/n8n-nodes-langchain.rerankerCohere - Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - Postgres Chat Memory
@n8n/n8n-nodes-langchain.memoryPostgresChat
From the author
An extendable RAG template to build powerful, explainable AI assistants — with query understanding, semantic metadata, and support for free-tier tools like Gemini, Gemma and Supabase. Description This workflow helps you build smart, production-ready RAG…