Skip to content
FlowHubFluxonLab
A
AI Automationfree

Document Q&A Chatbot with Gemini AI and Supabase Vector Search for Telegram

by Mohammad Ghaffarifaradapted from n8n official workflow galleryUpdated Aug 2026
RequiresAAI AgentCCodeDDefault Data LoaderEmbeddings Google GeminiEmbeddings Google GeminiGoogle Gemini Chat ModelRecursive Character Text SplitterRecursive Character Text SplitterSSimple MemorySupabase Vector StoreSupabase Vector StoreTelegramTelegramThink ToolThink ToolVector Store Question Answer ToolVector Store Question Answer Tool
Share Post Share
Google Gemini Chat ModelGoogle Gemini C…OWOpenWeatherMapAgAI AgentTelegram TriggerTelegramTTThinkEGEmbeddings Google GeminiEmbeddings Goog…DDDefault Data LoaderDefault Data Lo…TSRecursive Character Text SplitterRecursive Chara…EFExtract from FileExtract from Fi…TVAnswer questions with a vector storeAnswer question…VSSupabase Vector StoreSupabase Vector…Telegram - Embedding CompleteTelegram - Embe…VSSupabase - Save EmbeddingsSupabase - Save…SwCommand RouterTelegram - Download fileTelegram - Down…AgAggregateFallback- No formattingFallback- No fo…SOSplit OutMBSimple MemoryCoHandle formatting and splitHandle formatti…SeManual MappingUnsupported messageUnsupported mes…Send processing document messageSend processing…Send embedding Started messageSend embedding …1234567891011121314151617181920212223242526
1/5
STEPS · 26
Starts on a Telegram event

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. Import the workflow into your n8n instance.

Tags

n8nreference-onlyagentdocument-default-data-loaderembeddings-google-geminilm-chat-google-geminimemory-buffer-windowtelegramtext-splitter-recursive-character-text-splittertool-thinktool-vector-storevector-store-supabase
Connects
AAI AgentCCodeDDefault Data LoaderembeddingsgooglegeminiEmbeddings Google GeminiGoogle Gemini Chat ModelrecursivecharactertextsplitterRecursive Character Text Splitter
CategoryAI Automation
Triggermanual
Complexityadvanced
Nodes25
AddedMay 8, 2025

Related workflows

See all AI Automation
ACDgmail
free

AI: Summarize podcast episode and enhance using Wikipedia

The workflow automates the process of creating a summarized and enriched podcast digest, which is then sent via email. Note that to use this template, you need to be on n8n version 1.19.4 or later.

by n8n Team
ABembeddingsgooglegeminiW
free

Handle WhatsApp support chats with OpenRouter, Pinecone, and Gemini

Quick overview This template implements a WhatsApp support suite that logs inbound events to a dashboard API, routes conversations through an OpenRouter-powered AI agent with Pinecone RAG and memory, exposes a webhook for human outbound replies, and provides a webhook to summarize recent chats for handoff. How it works Triggers on WhatsApp Cloud API events and routes status updates (sent/delivered/read) to a dashboard API endpoint for storage. For inbound messages, looks up the contact in the dashboard API and normalizes the message into a consistent schema (sender, type, timestamp, and best-effort content). If the message contains media (image/video/audio/document), fetches the WhatsApp media URL, downloads the file, uploads it to the dashboard’s media endpoint, and attaches the resulting media URL and MIME type. Stores inbound messages and reactions in the dashboard API, then checks via the cases endpoint whether the sender already has an open case. If the inbound message is text and no open case is found, queries Pinecone as a tool (using Google Gemini embeddings), uses an OpenRouter chat model with conversation memory to draft a reply or create a new case via the dashboard API,

by Salman Mehboob
AopenaichatmodelS
free

Run a voice-enabled AI assistant on Telegram with OpenAI, Gmail and Notion

Quick overview This workflow turns a Telegram bot into a personal assistant that handles text and voice messages using OpenAI, can read Gmail and Google Calendar, looks up tasks and contacts in Notion, and can draft and send emails with a required approval step in Telegram. How it works Triggers when a new Telegram message is received by your bot. Detects whether the message is a voice note or text, and if it is voice, downloads it from Telegram and transcribes it with OpenAI. Sends the resulting user text to an OpenAI-powered agent that keeps a short conversation memory per chat. When needed, the agent fetches recent emails from Gmail, lists upcoming events from Google Calendar, and pulls tasks or contacts from Notion to answer the request. If the agent decides to send an email, it asks for approval in Telegram and only proceeds after you approve within the time limit. Sends the assistant’s final response back to the same Telegram chat. Setup Create a Telegram bot with @BotFather, add the Telegram credentials in n8n, and use the workflow’s Telegram trigger to connect the bot. Add an OpenAI API credential for both chat responses and voice transcription, and set your preferred model

by Dr. Firas