Interactive knowledge base chat with Supabase RAG using AI 📚💬
Needs changesWhat this workflow does
This AI workflow has 43 nodes and runs on Google Drive events (plus 2 other triggers). Along the way it connects Google Drive, Postgres, Supabase and Supabase Vector Store and 4 more.
How it runs
Trigger: On Google Drive events (plus 2 other triggers).
- Loop Over Items (Loop Over Items (Split in Batches)): loops over the items in batches
- Edit Fields (Edit Fields (Set)): sets or maps fields
- Set File ID (Edit Fields (Set)): sets or maps fields
- RAG AI Agent (AI Agent): runs an AI agent, with model: OpenAI Chat Model; 4 tools (List Documents, Query Document Rows, Supabase Vector Store, Get Full Document Text - Get File Contents); memory: Postgres Chat Memory
- Validate File (If): checks a condition and branches into true / false
- Check for Duplicates (Postgres): uses Postgres
- Set Error Type (Edit Fields (Set)): sets or maps fields
- If: checks a condition and branches into true / false
- Error Logger (Supabase): uses Supabase
- Log Duplicate (Supabase): uses Supabase
…plus 20 more steps. See the full node list below.
Services it uses
Other OpenAI + Gmail templates (1,623) · Other OpenAI + Google Drive templates (628) · Other Gmail + Google Drive templates (465)
Before you upgrade to n8n 3.0
1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:
- AI Agent v1 (old agent modes) in RAG AI Agent (v1.8): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).
Published 2025 — 19% of 2025 templates need changes for 3.0. See how template age affects 3.0 readiness →
| Removed in 3.0 | Replace with |
|---|---|
| AI Agent v1 (old agent modes) RAG AI Agent (v1.8) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
Nodes used (21)
- Google Drive Trigger
n8n-nodes-base.googleDriveTrigger - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - Edit Fields (Set)
n8n-nodes-base.set - Postgres
n8n-nodes-base.postgres - Extract from File
n8n-nodes-base.extractFromFile - Aggregate
n8n-nodes-base.aggregate - Summarize
n8n-nodes-base.summarize - Supabase
n8n-nodes-base.supabase - If
n8n-nodes-base.if - Supabase Vector Store
@n8n/n8n-nodes-langchain.vectorStoreSupabase - Embeddings OpenAI
@n8n/n8n-nodes-langchain.embeddingsOpenAi - Default Data Loader
@n8n/n8n-nodes-langchain.documentDefaultDataLoader - Google Drive
n8n-nodes-base.googleDrive - Switch
n8n-nodes-base.switch - Gmail
n8n-nodes-base.gmail - AI Agent
@n8n/n8n-nodes-langchain.agent - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Postgres Chat Memory
@n8n/n8n-nodes-langchain.memoryPostgresChat - Postgres Tool
n8n-nodes-base.postgresTool - Character Text Splitter
@n8n/n8n-nodes-langchain.textSplitterCharacterTextSplitter - Chat Trigger
@n8n/n8n-nodes-langchain.chatTrigger
From the author
Google Drive File Ingestion to Supabase for Knowledge Base 📂💾 Overview 🌟 This n8n workflow automates the process of ingesting files from Google Drive into a Supabase database, preparing them for a knowledge base system. It supports text-based files (PDF,…