AutomationMart
Home/Browse/Create a multi-modal Telegram support bot with GPT-4 and Supabase RAG
n8n

Create a multi-modal Telegram support bot with GPT-4 and Supabase RAG

n8nn8n48 modulesv1.0
OpenAIGoogle DriveTelegram

What It Does This n8n workflow turns your Telegram bot into a smart, multi-modal AI assistant that accepts text, documents, images, and audio messages, interprets them using OpenAI models, and responds instantly with context-aware answers. It integrates a Supabase vector database to store document embeddings and retrieve relevant information before sending a prompt to OpenAI — enabling a full RAG experience 💡 Why This Workflow? Most support bots can only handle basic text input. This workflow: -

At a glance

Create a multi-modal Telegram support bot with GPT-4 and Supabase RAG is a ready-made n8n workflow you import as a workflow JSON file — no build required. It connects OpenAI, Google Drive, Telegram. It's free to download. Follow the 5-step import below to go live in minutes.

Platform
n8n
Connects
OpenAI, Google Drive, Telegram
Modules
48
Price
Free
Version
v1.0
Create a multi-modal Telegram support bot with GPT-4 and Supabase RAG workflow diagram

About this workflow

What It Does This n8n workflow turns your Telegram bot into a smart, multi-modal AI assistant that accepts text, documents, images, and audio messages, interprets them using OpenAI models, and responds instantly with context-aware answers. It integrates a Supabase vector database to store document embeddings and retrieve relevant information before sending a prompt to OpenAI — enabling a full RAG experience 💡 Why This Workflow? Most support bots can only handle basic text input. This workflow: - Supports multiple input formats (voice, documents, images, text) - Dynamically extracts and processes data from uploaded files - Implements RAG by combining user input with relevant memory or vector-based context - Delivers more accurate, relevant, and human-like AI responses. 👤 Who It's For - Businesses looking to automate support using Telegram - Freelancers or solopreneurs offering AI Chatbots for businesses. - Creators building AI-powered bots for real use cases as it's great for Customer support knowledge, Legal or Policy document, long FAQs, Project documentation, and Product information retrieval. - Devs or analysts exploring AI + multi-format input + vector memory. ⚙️ How It Works 🗂️ Knowledge Base Setup Run the “Add to Supabase Vector DB” workflow manually to upload a document from your google drive and embed it into your vector database. This powers the Telegram chatbot’s ability to answer questions using your content. 🔁 Telegram Message Routing 1. Telegram Trigger captures the user message (Text, Image, Voice, Document) 2. Message Router routes input by type using a Switch node 3. Each type is handled separately: - Voice → Translate recording to text (.ogg, .mp3) - Image → Analyze image to text. - Text → Sent directly to AI Agent (.txt). - Document → Parsed (e.g. .docx to .txt) accordingly. #### 📎 Document Type Routing Before routing documents by type, the Supported Document File Types node first checks if the file extension is allowed. If not supported, it exits early with an error message — preventing unnecessary processing. Supported documents are then routed using the Document Router node, and converted to text for further processing. #### Supported Document File Types .jpg .jpeg .png .webp .pdf .doc .docx .xls .xlsx .json .xml. 4. The text content is combined with stored memory and embedded knowledge using a RAG approach, enabling the AI to respond based on real uploaded data. 🧠 RAG via Supabase Uploaded documents are vectorized using OpenAI Embeddings. Embeddings are stored in Supabase with metadata. On new questions, the chatbot: - Extracts question intent - Queries Supabase for semantically similar chunks - Ranks retrieved chunks to find the most relevant match. - Injects them into the prompt for OpenAI. - OpenAI generates a grounded response based on actual document content. 5. Response is sent to the Telegram user with content awareness. 🛠 How to Set It Up 1. Open n8n or your local/self-hosted instance. 2. Import the .json workflow file. 3. Set up these credentials: - Google drive API Key - Telegram API (Bot Token) Guide - OpenAI API - Supabase API Key + Environment - ConvertAPI API Key - Postgres API Key - Cohere API Key - Add a prompt suited to your business. Add a custom AI agent prompt that reflects your business domain, tone, and purpose. This is very important. Without it, your agent won't know how best to respond. 4. Activate the workflow. 5. Start testing by sending a message or document to your Telegram bot.

n8n

How to import this n8n workflow

  1. 1

    Download the workflow JSON file after purchase.

  2. 2

    Open n8n → click the menu → Import from File.

  3. 3

    Select the downloaded JSON and import.

  4. 4

    Set up credentials for each node that requires them.

  5. 5

    Click Execute Workflow to test, then activate.

Setup guide

Setup guide included

Purchase to unlock the full step-by-step guide

Related N8n workflows

Generate AI newsletter drafts from Google Sheets to Notion with GPT-5-mini

How it works: This template turns rows in a Google Sheet into polished newsletter drafts in Notion using an AI writing agent. You click Execute workflow in n8n. It fetches all rows marked N8n Status = Pending, generates a draft from Newsletter Title and About the Newsletter, creates a Notion page, writes the full draft, then flips the sheet row to Done before moving to the next one. Before you start (use your own credentials): Create and select your credentials in n8n: Google Sheets (OAuth2 or

Free

Analyze & summarize Amazon product reviews with Decodo, OpenAI and Google Sheets

Disclaimer Please note - This workflow is only available on n8n self-hosted as it’s making use of the community node for the Decodo Web Scraping This n8n workflow automates the process of scraping, analyzing, and summarizing Amazon product reviews using Decodo’s Amazon Scraper, OpenAI GPT-4.1-mini, and Google Sheets for seamless reporting. It turns messy, unstructured customer feedback into actionable product insights — all without manual review reading. Who this is for This workflow is designed

Free

Scrape and ingest web content into Supabase pgvector with Firecrawl

What this does Receives a URL via webhook, uses Firecrawl to scrape the page into clean markdown, and stores it as vector embeddings in Supabase pgvector. A visual, self-hosted ingestion pipeline for RAG knowledge bases. Adding a new source is as simple as sending a URL. The second part of the workflow exposes a chat interface where an AI Agent queries the stored knowledge base to answer questions, with Cohere reranking for better retrieval quality. How it works Part 1: Ingestion Pipeline 1. Web

Free

Upload media from Instagram to Google Drive automatically

Automatically upload Instagram media to Google Drive. When new media is posted on Instagram, Make saves it to your Google Drive.

Free

Parse natural language dates with OpenAI GPT-4o for smart scheduling

This n8n workflow demonstrates how to transform natural language date and time expressions into structured data with 96%+ accuracy. Parse complex expressions like "early next July", "2 weeks after project launch", or "end of Q3" into precise datetime objects with confidence scoring, timezone intelligence, and business rules validation for any automation workflow. Good to know Achieves 96%+ accuracy on complex natural language date expressions At time of writing, this is the most advanced open-

Free

Optimize Amazon ads with GPT-4o for bid, budget & keyword recommendations

Overview This template is designed for Amazon sellers and advertisers who want to automate their campaign performance analysis and bidding strategy. It solves the common challenge of manually reviewing Sponsored Products reports and guessing how to adjust keywords, placements, and budgets. By combining Amazon Advertising reports with OpenAI's GPT-4o, this workflow delivers real-time, personalized optimization instructions — automatically. Features 📥 Automatically downloads Sponsored Products rep

Free

Generate multiple T-shirt design prompts from images with GPT-4o

Disclaimer This Workflow uses a community node. What It Does Workflow Demonstration This powerful workflow eliminates hours of trial and error when trying to craft the perfect prompt for AI-generated images. By simply saving an image of the design you want to model your generated images after into a designated folder on your desktop, the workflow is automatically triggered. Once the image is saved, n8n pulls it into the workflow, where an Analyze Image AI agent powered by GPT-4o analyzes it and

Free

Discover and enrich competitor clients with PredictLeads and Google Sheets

Discover your competitor's clients through PredictLeads connections data, enrich each client with company details, and export everything to Google Sheets. This workflow takes a list of competitor domains from Google Sheets, queries the PredictLeads Connections API to discover their client relationships, enriches each discovered client with company profile data (industry, employee count, location), and writes the results to a structured output sheet for competitive intelligence. How it works: 1.

Free

Reviews

No reviews yet

Be the first to buy and share your experience.

Leave a review

Sign in to share your experience with this workflow.

Log in to review
Free
No ratings yet

Create a free account to purchase workflows.

  • JSON blueprint — instant download
  • Setup guide PDF included
  • 5 downloads · valid 30 days
  • Works with n8n

Need help setting this up?

Book a 3-hour live setup session with an Agility consultant.

₹2,499/ session
3 hrs · video call
  • Configure live on Google Meet / Zoom
  • Free follow-up if workflow has defects
  • Platform expert assigned to you
Book installation session
Free