Sync a Telegram RAG chatbot with Google Drive using OpenAI and Supabase
Ready for 3.0What this workflow does
This AI workflow has 25 nodes and runs on Telegram events (message) (plus 3 other triggers). Along the way it connects OpenRouter Chat Model, Supabase Vector Store, Embeddings OpenAI and Google Drive and 3 more.
How it runs
Trigger: On Telegram events (message) (plus 3 other triggers).
- Answer from knowledge base (AI Agent): runs an AI agent, with model: Language Model (OpenRouter); 1 tool (Search knowledge base); memory: Postgres Chat Memory
- Download the PDF (Google Drive): download
- Remove outdated vectors (Supabase): delete
- Remove vectors from database (Supabase): delete
- Send a text message (Telegram): uses Telegram
- Extract text from PDF (Extract from File): extracts data from a file (pdf)
- Download updated PDF (Google Drive): download
- Confirm file removed from Drive (Google Drive): delete file
- Tag with file ID and name (Edit Fields (Set)): sets 1 field: text
- Extract text from updated PDF (Extract from File): extracts data from a file (pdf)
…plus 3 more steps. See the full node list below.
Services it uses
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 (13)
- AI Agent
@n8n/n8n-nodes-langchain.agent - OpenRouter Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenRouter - Supabase Vector Store
@n8n/n8n-nodes-langchain.vectorStoreSupabase - Embeddings OpenAI
@n8n/n8n-nodes-langchain.embeddingsOpenAi - Google Drive Trigger
n8n-nodes-base.googleDriveTrigger - Google Drive
n8n-nodes-base.googleDrive - Extract from File
n8n-nodes-base.extractFromFile - Supabase
n8n-nodes-base.supabase - Edit Fields (Set)
n8n-nodes-base.set - Default Data Loader
@n8n/n8n-nodes-langchain.documentDefaultDataLoader - Telegram Trigger
n8n-nodes-base.telegramTrigger - Telegram
n8n-nodes-base.telegram - Postgres Chat Memory
@n8n/n8n-nodes-langchain.memoryPostgresChat
From the author
Quick overview This workflow runs a Telegram RAG chatbot that answers questions using PDFs synced from Google Drive into a Supabase vector store, automatically re-indexing when files are added or updated and removing knowledge when files are moved to a trash…