Templates / Sync a Telegram RAG chatbot with Google Drive using OpenAI and Supabase

Sync a Telegram RAG chatbot with Google Drive using OpenAI and Supabase

Ready for 3.0

by MADIAD ✓ · 37 views · created 2026-09-21 · Internal Wiki, AI RAG

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What 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).

  1. Answer from knowledge base (AI Agent): runs an AI agent, with model: Language Model (OpenRouter); 1 tool (Search knowledge base); memory: Postgres Chat Memory
  2. Download the PDF (Google Drive): download
  3. Remove outdated vectors (Supabase): delete
  4. Remove vectors from database (Supabase): delete
  5. Send a text message (Telegram): uses Telegram
  6. Extract text from PDF (Extract from File): extracts data from a file (pdf)
  7. Download updated PDF (Google Drive): download
  8. Confirm file removed from Drive (Google Drive): delete file
  9. Tag with file ID and name (Edit Fields (Set)): sets 1 field: text
  10. 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

OpenRouter Chat ModelSupabase Vector StoreEmbeddings OpenAIGoogle DriveSupabaseTelegramPostgres Chat Memory

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)

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…

Excerpt from MADIAD's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.