Create a self-updating RAG chatbot with Google Drive, Gemini, and Supabase
Ready for 3.0What this workflow does
This AI workflow has 34 nodes and runs when a chat message arrives (plus 4 other triggers). Along the way it connects Reranker Cohere, Supabase Vector Store, Google Drive and Supabase and 4 more.
How it runs
Trigger: When a chat message arrives (plus 4 other triggers).
- RAG Agent (AI Agent): runs an AI agent, with model: Google Gemini Chat Model; 1 tool (Supabase Vector Store); memory: Postgres Chat Memory
- Loop Over Items (Loop Over Items (Split in Batches)): loops over the items in batches
- Search files and folders (Google Drive): work with file folder
- Get File IDs (Google Drive): work with file folder
- Supabase: get many
- Get File IDs (Google Drive): work with file folder
- Supabase: get many
- Set File ID (Edit Fields (Set)): sets 4 fields: file_id, file_type, file_title…
- Merge: merges the data from its input branches
- Merge: merges the data from its input branches
…plus 11 more steps. See the full node list below.
Services it uses
Other Google Gemini + Google Drive templates (272) · Other Google Drive + Supabase templates (67) · Other Google Gemini + Supabase templates (66)
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.
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Nodes used (21)
- Reranker Cohere
@n8n/n8n-nodes-langchain.rerankerCohere - Supabase Vector Store
@n8n/n8n-nodes-langchain.vectorStoreSupabase - AI Agent
@n8n/n8n-nodes-langchain.agent - Google Drive Trigger
n8n-nodes-base.googleDriveTrigger - Extract from File
n8n-nodes-base.extractFromFile - Supabase
n8n-nodes-base.supabase - Edit Fields (Set)
n8n-nodes-base.set - Character Text Splitter
@n8n/n8n-nodes-langchain.textSplitterCharacterTextSplitter - Switch
n8n-nodes-base.switch - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - Postgres
n8n-nodes-base.postgres - Default Data Loader
@n8n/n8n-nodes-langchain.documentDefaultDataLoader - Google Drive
n8n-nodes-base.googleDrive - Merge
n8n-nodes-base.merge - Code
n8n-nodes-base.code - Schedule Trigger
n8n-nodes-base.scheduleTrigger - Manual Trigger
n8n-nodes-base.manualTrigger - Postgres Chat Memory
@n8n/n8n-nodes-langchain.memoryPostgresChat - Chat Trigger
@n8n/n8n-nodes-langchain.chatTrigger - Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - Embeddings Google Gemini
@n8n/n8n-nodes-langchain.embeddingsGoogleGemini
From the author
This template creates a comprehensive, production-ready Retrieval-Augmented Generation (RAG) system. It builds a sophisticated AI agent that can answer questions based on documents stored in a specific Google Drive folder, and it automatically keeps its…