{"product_id":"telegram-knowledge-base-bot-n8n-with-openrouter-supabase","title":"Telegram Knowledge Base Bot (n8n) with OpenRouter + Supabase","description":"\u003ch3\u003eTurn your Telegram into a controlled, knowledge-grounded Q\u0026amp;A bot—powered by n8n, OpenRouter, and a Supabase vector knowledge base.\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow runs a Telegram private knowledge-base bot where only admin-approved users can ask questions (text or voice). Answers are generated by an OpenRouter chat model and grounded with retrieval from your Supabase vector store—kept current via a manual Google Docs (Google Drive) to Supabase sync.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cb\u003eTelegram trigger:\u003c\/b\u003e Starts on incoming Telegram messages and callback queries.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003eAccess control:\u003c\/b\u003e Admin button callbacks (from the configured control chat) save approved\/denied\/blocked status into \u003cb\u003eRedis\u003c\/b\u003e and notify both the admin and the target user.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003eUser request flow:\u003c\/b\u003e For user messages, it reads access status from Redis. If access is pending, denied, or blocked, it replies accordingly; otherwise it creates a pending request in Redis and sends an approval request to the admin via inline buttons.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003eApproved answering:\u003c\/b\u003e For approved users, it handles \u003cb\u003e\/start\u003c\/b\u003e and \u003cb\u003e\/help\u003c\/b\u003e, rejects unsupported input, and processes \u003cb\u003evoice messages\u003c\/b\u003e by downloading the Telegram file and transcribing it with \u003cb\u003eOpenAI\u003c\/b\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003eGrounded response generation:\u003c\/b\u003e Sends the user’s question to a LangChain agent using an \u003cb\u003eOpenRouter\u003c\/b\u003e chat model with Redis chat memory and a \u003cb\u003eSupabase vector-store retrieval tool\u003c\/b\u003e to produce a grounded Russian answer.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003eTelegram-safe delivery:\u003c\/b\u003e Splits long answers into chunks and sends them back through Telegram.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003eKnowledge base updates:\u003c\/b\u003e Includes a manual trigger to list Google Docs from a specified location and sync them into Supabase.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eSaaS operators who need a \u003cb\u003eprivate Telegram support bot\u003c\/b\u003e with approval-based access.\u003c\/li\u003e\n  \u003cli\u003eAutomation engineers building a \u003cb\u003eknowledge-grounded Q\u0026amp;A\u003c\/b\u003e system using Supabase vectors.\u003c\/li\u003e\n  \u003cli\u003eTeams who maintain documentation in \u003cb\u003eGoogle Docs\u003c\/b\u003e and want periodic updates to an AI retrieval index.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cb\u003en8n nodes\/logic:\u003c\/b\u003e if, set, code, redis, switch, telegram\u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003eIntegrations:\u003c\/b\u003e Telegram (private bot), Redis (access + chat memory), OpenRouter (chat model), OpenAI (voice transcription), Supabase (vector store retrieval), Google Docs\/Google Drive (manual sync)\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":46086664454323,"sku":"N8N-19900","price":38.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/B50-YTTZaIhbWooVoa48F_iZngpRj4.png?v=1790327551","url":"https:\/\/buyflowscripts.com\/products\/telegram-knowledge-base-bot-n8n-with-openrouter-supabase","provider":"N8N Commerce","version":"1.0","type":"link"}