Document Q&A chatbot with Gemini AI and Supabase vector search for Telegram
Needs changesNeeds changes. This template uses 1 thing(s) that n8n 3.0 removes: AI Agent v1 (old agent modes). 1 breaking item(s) found. Static check, last run 2026-10-19.
What to replace before upgrading
| 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
What it does
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 long text responses. ๐น Watch the Bot in Action !๐จ๐ป๐น๐ฒ๐ฎ๐๐ต๐ถ๐ป๐ด ๐๐ ๐ผ๐ป ๐ ๐ ๐๐ผ๐ผ๐ธ๐๐ต๐ฒ๐น๐ณ: ๐๐น๐ผ๐ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ด ๐ฃ๐ผ๐๐ฒ๐ฟ๐ ๐ฎ ๐ก๐ฒ๐
๐-๐๐ฒ๐๐ฒ๐น ๐ง๐ฒ๐น๐ฒ๐ด๐ฟ๐ฎ๐บ ๐๐ผ๐๐ค โถ๏ธ Click the image above to watch a live demo on YouTube. This video provides a live demonstration of the bot's core features and how it interacts. See a quick walkthrough of its capabilities and user flow. How it works: User uploads a PDF document to a Telegram bot. The workflow processes the PDF, creates embeddings using Google Gemini, and stores these embeddings in a Supabase vector table. Users then ask questions to the bot. The workflow performs a vector search in Supabase to find relevant document chunks based on the user's query. Google Gemini uses the retrieved relevant chunks to generate an intelligent answer. The bot sends the formatted answer back to the user on Telegram, utilizing HTML markup for enhanced presentation. Set up steps: Setup should take approximately 15-20 minutes. 1. Import the workflow into your n8n instance. 2. Configure credentials for Telegram, Google Gemini, and Supabase. 3. Set up your Supabase vector table using the provided SQL script. 4. Activate the workflow. Detailed setup instructions, including how to get API keys and configure nodes, are available in the sticky notes within the workflow itself.