Document Q&A chatbot with Gemini AI and Supabase vector search for Telegram
Needs changesWhat this workflow does
This AI workflow has 25 nodes and runs on Telegram events (message). Along the way it connects Google Gemini Chat Model, OpenWeatherMap, Telegram and Embeddings Google Gemini and 2 more.
How it runs
Trigger: On Telegram events (message).
- Command Router (Switch): routes items into 2 branches
- Telegram: work with file
- AI Agent: runs an AI agent, with model: Google Gemini Chat Model; 3 tools (Think, OpenWeatherMap, Answer questions with a vector store); memory: Simple Memory
- Unsupported message (Telegram): uses Telegram
- Extract from File: extracts data from a file (pdf)
- Send processing document message (Telegram): uses Telegram
- Handle formatting and split (Code): runs custom Python code
- Supabase - Save Embeddings (Supabase Vector Store): stores documents in the Supabase vector store, with embeddings: Embeddings Google Gemini; document loader: Default Data Loader
- Send embedding Started message (Telegram): uses Telegram
- Split Out: splits a list into separate items
…plus 5 more steps. See the full node list below.
Services it uses
Other Telegram + Google Gemini templates (354) · Other Google Gemini + Supabase templates (66) · Other Telegram + Supabase templates (49)
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 AI Agent (v1.9): 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 →
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
| Removed in 3.0 | Replace with |
|---|---|
| AI Agent v1 (old agent modes) AI Agent (v1.9) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
Nodes used (18)
- Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - Open Weather Map Tool
n8n-nodes-base.openWeatherMapTool - AI Agent
@n8n/n8n-nodes-langchain.agent - Telegram Trigger
n8n-nodes-base.telegramTrigger - Telegram
n8n-nodes-base.telegram - Think Tool
@n8n/n8n-nodes-langchain.toolThink - Embeddings Google Gemini
@n8n/n8n-nodes-langchain.embeddingsGoogleGemini - Default Data Loader
@n8n/n8n-nodes-langchain.documentDefaultDataLoader - Recursive Character Text Splitter
@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter - Extract from File
n8n-nodes-base.extractFromFile - Vector Store Question Answer Tool
@n8n/n8n-nodes-langchain.toolVectorStore - Supabase Vector Store
@n8n/n8n-nodes-langchain.vectorStoreSupabase - Switch
n8n-nodes-base.switch - Aggregate
n8n-nodes-base.aggregate - Split Out
n8n-nodes-base.splitOut - Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow - Code
n8n-nodes-base.code - Edit Fields (Set)
n8n-nodes-base.set
From the author
This template creates a Telegram AI Assistant that answers questions based on your documents, powered by Google Gemini and Supabase. Key features include Intelligent HTML Post-processing for rich formatting in Telegram and Adaptive Message Chunking to handle…