Chat with documents via RAG: Google Drive to GPT-5 with Supabase vector database
Needs changesWhat this workflow does
This AI workflow has 23 nodes and runs on Telegram events (plus 5 other triggers). Along the way it connects Google Drive, Embeddings OpenAI, Supabase Vector Store and Postgres Chat Memory and 5 more.
How it runs
Trigger: On Telegram events (plus 5 other triggers).
- Edit Fields (Edit Fields (Set)): sets or maps fields
- RAG Agent (AI Agent): runs an AI agent, with model: GPT; 1 tool (Supabase Vector Store); memory: Chat Memory
- Download File (Google Drive): uses Google Drive
- Send a text message (Telegram): uses Telegram
- Send message (WhatsApp Business Cloud): uses WhatsApp Business Cloud
- Send a message (Slack): uses Slack
- Send a message (Gmail): uses Gmail
- OCR (Mistral AI): uses Mistral AI
- Split Out: splits a list into separate items
- Insert into Supabase Vectorstore (Supabase Vector Store): uses the Supabase vector store, with embeddings: Embeddings OpenAI; document loader: Default Data Loader
Services it uses
Other OpenAI + Gmail templates (1,623) · Other OpenAI + Slack templates (979) · Other Gmail + Slack templates (957)
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 Agent (v1.6): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
- Also check Slack Trigger requires a signing secret on the Slack API credential.
- Also check Gmail Trigger below v1.4 runs as v1.4 (drafts skipped, max emails per poll).
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 Agent (v1.6) | 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
n8n-nodes-base.googleDrive - Split Out
n8n-nodes-base.splitOut - Default Data Loader
@n8n/n8n-nodes-langchain.documentDefaultDataLoader - Embeddings OpenAI
@n8n/n8n-nodes-langchain.embeddingsOpenAi - Character Text Splitter
@n8n/n8n-nodes-langchain.textSplitterCharacterTextSplitter - Supabase Vector Store
@n8n/n8n-nodes-langchain.vectorStoreSupabase - Google Drive Trigger
n8n-nodes-base.googleDriveTrigger - Mistral AI
n8n-nodes-base.mistralAi - Postgres Chat Memory
@n8n/n8n-nodes-langchain.memoryPostgresChat - Chat Trigger
@n8n/n8n-nodes-langchain.chatTrigger - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - AI Agent
@n8n/n8n-nodes-langchain.agent - Slack Trigger
n8n-nodes-base.slackTrigger - Telegram Trigger
n8n-nodes-base.telegramTrigger - Gmail Trigger
n8n-nodes-base.gmailTrigger - WhatsApp Trigger
n8n-nodes-base.whatsAppTrigger - Edit Fields (Set)
n8n-nodes-base.set - Telegram
n8n-nodes-base.telegram - WhatsApp Business Cloud
n8n-nodes-base.whatsApp - Slack
n8n-nodes-base.slack - Gmail
n8n-nodes-base.gmail
From the author
📄 n8n RAG Ingestion & Query Workflow Overview This workflow is your all-in-one pipeline to turn any document into a powerful searchable knowledge base using RAG (Retrieval-Augmented Generation). From the moment a file lands in your Google Drive, it’s…