Back to Integrations
integrationSupabase node
integrationTelegram node

Supabase and Telegram integration

Save yourself the work of writing custom integrations for Supabase and Telegram and use n8n instead. Build adaptable and scalable Data & Storage, Communication, and HITL workflows that work with your technology stack. All within a building experience you will love.

How to connect Supabase and Telegram

  • Step 1: Create a new workflow
  • Step 2: Add and configure nodes
  • Step 3: Connect
  • Step 4: Customize and extend your integration
  • Step 5: Test and activate your workflow

Step 1: Create a new workflow and add the first step

In n8n, click the "Add workflow" button in the Workflows tab to create a new workflow. Add the starting point – a trigger on when your workflow should run: an app event, a schedule, a webhook call, another workflow, an AI chat, or a manual trigger. Sometimes, the HTTP Request node might already serve as your starting point.

Supabase and Telegram integration: Create a new workflow and add the first step

Step 2: Add and configure Supabase and Telegram nodes

You can find Supabase and Telegram in the nodes panel. Drag them onto your workflow canvas, selecting their actions. Click each node, choose a credential, and authenticate to grant n8n access. Configure Supabase and Telegram nodes one by one: input data on the left, parameters in the middle, and output data on the right.

Supabase and Telegram integration: Add and configure Supabase and Telegram nodes

Step 3: Connect Supabase and Telegram

A connection establishes a link between Supabase and Telegram (or vice versa) to route data through the workflow. Data flows from the output of one node to the input of another. You can have single or multiple connections for each node.

Supabase and Telegram integration: Connect Supabase and Telegram

Step 4: Customize and extend your Supabase and Telegram integration

Use n8n's core nodes such as If, Split Out, Merge, and others to transform and manipulate data. Write custom JavaScript or Python in the Code node and run it as a step in your workflow. Connect Supabase and Telegram with any of n8n’s 1000+ integrations, and incorporate advanced AI logic into your workflows.

Supabase and Telegram integration: Customize and extend your Supabase and Telegram integration

Step 5: Test and activate your Supabase and Telegram workflow

Save and run the workflow to see if everything works as expected. Based on your configuration, data should flow from Supabase to Telegram or vice versa. Easily debug your workflow: you can check past executions to isolate and fix the mistake. Once you've tested everything, make sure to save your workflow and activate it.

Supabase and Telegram integration: Test and activate your Supabase and Telegram workflow

Allow users to send a sequence of messages to an AI agent in Telegram

Use Case
When creating chatbots that interface through applications such as Telegram and WhatsApp, users can often sends multiple shorter messages in quick succession, in place of a single, longer message. This workflow accounts for this behaviour.
What it Does
This workflow allows users to send several messages in quick succession, treating them as one coherent conversation instead of separate messages requiring individual responses.
How it Works
When messages arrive, they are stored in a Supabase PostgreSQL table
The system waits briefly to see if additional messages arrive
If no new messages arrive within the waiting period, all queued messages are:
Combined and processed as a single conversation
Responded to with one unified reply
Deleted from the queue
Setup
Create a table in Supabase called message_queue. It needs to have the following columns: user_id (uint8), message (text), and message_id (uint8)
Add your Telegram, Supabase, OpenAI, and PostgreSQL credentials
Activate the workflow and test by sending multiple messages the Telegram bot in one go
Wait ten seconds after which you will receive a single reply to all of your messages
How to Modify it to Your Needs
Change the value of Wait Amount in the Wait 10 Seconds node in order to to modify the buffering window
Add a System Message to the AI Agent to tailor it to your specific use case
Replace the OpenAI sub-node to use a different language model

Nodes used in this workflow

Popular Supabase and Telegram workflows

RAG Chatbot with Supabase + TogetherAI + Openrouter

⚠️ RUN the FIRST WORKFLOW ONLY ONCE (as it will convert your content in Embedding format and save it in DB and is ready for the RAG Chat) 📌 Telegram Trigger Type:** telegramTrigger Purpose:** Waits for new Telegram messages to trigger the workflow. Note:** Currently disabled. 📄 Content for the Training Type:** googleDocs Purpose:** Fetches document content from Google Docs using its URL. Details:** Uses Service Account authentication. ✂️ Splitting into Chunks Type:** code Purpose:** Splits the fetched document text into smaller chunks (1000 chars each) for processing. Logic:** Loops over text and slices it. 🧠 Embedding Uploaded Document Type:** httpRequest Purpose:** Calls Together AI embedding API to get vector embeddings for each text chunk. Details:** Sends JSON with model name and chunk as input. 🛢 Save the embedding in DB Type:** supabase Purpose:** Saves each text chunk and its embedding vector into the Supabase embed table. SECOND WORKFLOW EXPLAINATION: 💬 When chat message received Type:** chatTrigger Purpose:** Starts the workflow when a user sends a chat message. Details:** Sends an initial greeting message to the user. 🧩 Embend User Message Type:** httpRequest Purpose:** Generates embedding for the user’s input message. Details:** Calls Together AI embeddings API. 🔍 Search Embeddings Type:** httpRequest Purpose:** Searches Supabase DB for the top 5 most similar text chunks based on the generated embedding. Details:** Calls Supabase RPC function matchembeddings1. 📦 Aggregate Type:** aggregate Purpose:** Combines all retrieved text chunks into a single aggregated context for the LLM. 🧠 Basic LLM Chain Type:** chainLlm Purpose:** Passes the user's question + aggregated context to the LLM to generate a detailed answer. Details:** Contains prompt instructing the LLM to answer only based on context. 🤖 OpenRouter Chat Model Type:** lmChatOpenRouter Purpose:** Provides the actual AI language model that processes the prompt. Details:** Uses qwen/qwen3-8b:free model via OpenRouter and you can use any of your choice.
+4

AI-Powered Lead Generation with Apollo, GPT-4, and Telegram to Database

AI-Powered Lead Generation with Apollo, GPT-4, and Telegram to Database Overview This intelligent lead generation workflow transforms voice commands or text input into verified prospect lists through automated Apollo.io scraping. The system processes natural language requests, extracts search parameters using AI, and delivers clean, verified contact data directly to your database. Key Features 🎤 Voice & Text Input Processing Voice Recognition**: Converts audio messages to text using OpenAI's transcription API Natural Language Processing**: AI agent interprets requests and extracts search criteria Flexible Input**: Supports both voice commands and text messages 🔍 Smart Lead Scraping Apollo.io Integration**: Automated scraping using official Apollo.io API Dynamic URL Generation**: Builds search URLs based on extracted parameters Intelligent Parsing**: Processes location, industry, and job title criteria ✅ Email Verification & Filtering Verified Emails Only**: Filters results to include only verified email addresses Duplicate Prevention**: Compares against existing database to avoid duplicates Data Quality Control**: Ensures high-quality prospect data 📊 Automated Data Management Database Integration**: Automatic storage in PostgreSQL/Supabase Structured Data**: Organizes contacts with complete profile information Real-time Updates**: Instant database updates with new prospects How It Works Input Processing: Receive voice message or text command AI Analysis: Extract search parameters (location, industry, job titles) URL Construction: Build Apollo.io search URL with extracted criteria Data Scraping: Retrieve prospect data via Apollo.io API Email Verification: Filter for verified email addresses only Duplicate Check: Compare against existing database records Data Storage: Save new prospects to database Confirmation: Send success notification with count of new leads Supported Search Parameters Location**: City, state, country combinations Industry**: Business sectors and verticals Job Titles**: Executive roles, departments, seniority levels Company Size**: Organization scale and employee count Data Fields Extracted Contact Information First Name & Last Name Email Address (verified only) LinkedIn Profile URL Phone Number (when available) Professional Details Current Job Title Company Name Industry Seniority Level Employment History Location Data City & State Country Full Location String Company Information Website URL Business Industry Organization Details Technical Architecture Core Components n8n Workflow Engine**: Orchestrates the entire process OpenAI Integration**: Powers voice transcription and AI analysis Apollo.io API**: Source for prospect data PostgreSQL/Supabase**: Database storage and management API Integrations OpenAI Whisper API for voice transcription OpenAI GPT for natural language processing Apollo.io API for lead data retrieval Supabase API for database operations Use Cases Sales Teams Quickly build prospect lists for outreach campaigns Target specific industries or job roles Maintain clean, verified contact databases Marketing Professionals Generate targeted lead lists for campaigns Research prospects in specific markets Build comprehensive contact databases Business Development Identify potential partners or clients Research competitive landscapes Generate contact lists for networking Recruitment Find candidates in specific locations Target particular job roles or industries Build talent pipeline databases Benefits ⚡ Speed & Efficiency Voice commands for instant lead generation Automated processing eliminates manual work Batch processing for large prospect lists 🎯 Precision Targeting AI-powered parameter extraction Flexible search criteria combinations Industry and role-specific filtering 📈 Data Quality Verified email addresses only Duplicate prevention Structured, consistent data format 🔄 Automation End-to-end automated workflow Real-time database updates Instant confirmation notifications Setup Requirements Prerequisites n8n workflow platform OpenAI API access Apollo.io API credentials PostgreSQL or Supabase database Messaging platform integration Configuration Steps Import workflow into n8n Configure API credentials Set up database connections Customize search parameters Test with sample voice/text input Customization Options Search Parameters Modify location formats Add custom industry categories Adjust job title variations Set result limits Data Processing Customize field mappings Add data validation rules Implement additional filters Configure output formats Integration Options Connect to CRM systems Add email marketing tools Integrate with sales platforms Export to various formats Success Metrics Processing Speed**: Voice-to-database in under 30 seconds Data Accuracy**: 95%+ verified email addresses Automation Level**: 100% hands-free operation Scalability**: Process 500+ leads per request Transform your lead generation process with intelligent automation that understands natural language and delivers verified prospects directly to your database.
+7

Company Knowledge Base Agent (RAG)

Overview Turn your docs into an AI-powered internal or public-facing assistant. This chatbot workflow uses RAG (Retrieval-Augmented Generation) with Supabase vector search to answer employee or customer questions based on your company documents—automatically updated via Google Drive. Whether it’s deployed in Telegram or embedded on your website, this agent supports voice and text input, transcribes voice messages, pulls relevant context from your internal files, and responds with a helpful, AI-generated answer. Two additional workflows listen for file changes in a shared Google Drive folder, convert them into embeddings using OpenAI, and sync them with your Supabase vector DB—so your knowledge base is always up to date. Who’s it for Startups building an internal ops or HR assistant SaaS companies deploying help bots on their websites Customer support teams reducing repetitive questions Knowledge-driven teams needing internal AI assistants How it works Triggered via Telegram bot (or easily swapped for website chatbot or “on chat message”) If user sends a voice message, it’s transcribed to text using OpenAI Whisper Input is passed to a RAG agent that: Searches a Supabase vector store for relevant docs Pulls context from matching chunks using OpenAI embeddings Responds with an LLM-powered answer The response is sent back as a Telegram message Two separate workflows: New File Workflow: Listens for file uploads in Google Drive, extracts and splits text, then sends to Supabase with embeddings Update File Workflow: Detects file edits, deletes old rows, and updates embeddings for the revised file Example use case > You upload your internal policy docs and client FAQs into a Google Drive folder. > > Employees or customers can now ask: > - “What’s the refund policy for annual plans?” > - “How do I request a day off?” > - “What tools are approved for use by the engineering team?” > > The chatbot instantly pulls up the right section and responds with a smart, confident answer. How to set up Connect a Telegram bot or use n8n’s webchat / chatbot widget Hook up OpenAI for transcription, embeddings, and completion Set up a Supabase project and connect it as a vector store Upload your internal docs to Google Drive Deploy the “Add File” and “Update File” automations to manage embedding sync Customize the chatbot’s tone and personality with prompt tweaks Requirements Telegram bot (or n8n Chat widget) Google Drive integration Supabase with pgvector or similar enabled OpenAI API key (Whisper, Embeddings, ChatGPT) Two folders: one for raw documents and one for tracking updates How to customize Swap Supabase for Pinecone, Weaviate, or Qdrant Replace Telegram with web chat, Slack, Intercom, or Discord Add logic to handle fallback answers or escalate to human Embed the chat widget on your site for public customer use Add filters (e.g. department, date, author) to narrow down context
+7

Automated US Stock Portfolio Analysis with Telegram, Perplexity AI & PDF Reports

System Architecture Two integrated N8N workflows providing automated US stock portfolio management through Telegram: FLOW 1: Conversational Portfolio Manager Telegram bot for interactive portfolio management PDF upload & analysis via LlamaIndex Cloud API Natural language portfolio updates via GPT-4.1-mini Real-time user registration and data management FLOW 2: Automated Weekly Reports Schedule-triggered weekly analysis (every 7 days) Perplexity AI sonar-deep-research for market analysis Professional PDF report generation via PDFco Automatic Telegram delivery to all registered users

Allow Users to Send a Sequence of Messages to an AI Agent in Telegram

Use Case When creating chatbots that interface through applications such as Telegram and WhatsApp, users can often sends multiple shorter messages in quick succession, in place of a single, longer message. This workflow accounts for this behaviour. What it Does This workflow allows users to send several messages in quick succession, treating them as one coherent conversation instead of separate messages requiring individual responses. How it Works When messages arrive, they are stored in a Supabase PostgreSQL table The system waits briefly to see if additional messages arrive If no new messages arrive within the waiting period, all queued messages are: Combined and processed as a single conversation Responded to with one unified reply Deleted from the queue Setup Create a table in Supabase called message_queue. It needs to have the following columns: user_id (uint8), message (text), and message_id (uint8) Add your Telegram, Supabase, OpenAI, and PostgreSQL credentials Activate the workflow and test by sending multiple messages the Telegram bot in one go Wait ten seconds after which you will receive a single reply to all of your messages How to Modify it to Your Needs Change the value of Wait Amount in the Wait 10 Seconds node in order to to modify the buffering window Add a System Message to the AI Agent to tailor it to your specific use case Replace the OpenAI sub-node to use a different language model

Create a Two-Way WhatsApp + Telegram Integration for 10k+ Customer Support Chats

⚡ Next-Gen Customer Support: Two-Way WhatsApp + Telegram Integration for 10k+ Clients Who is this workflow for This workflow is designed for **customer support teams, e-commerce founders, and operations managers** who want to handle thousands of customer queries seamlessly. Instead of building a brand-new chat application, it leverages WhatsApp (where customers already are) and Telegram (where your support team operates) to create a scalable, topic-based support system. If you are a brand handling 1000s of daily WhatsApp customer messages and need a structured way to map each customer into a dedicated support thread without chaos, this workflow is for you. What it does / How it works This two-way n8n automation bridges WhatsApp and Telegram by creating one Telegram forum topic per customer and syncing messages both ways: Incoming WhatsApp → Telegram When a new WhatsApp message arrives, the workflow checks if the customer already has a topic in Telegram. If yes → The message is forwarded into that existing topic. If no → A new topic is created automatically, the mapping is saved in the database, and the message is posted there. Result: every customer has a dedicated thread in your Telegram supergroup. Outgoing Telegram → WhatsApp When a support agent replies in a Telegram topic, the workflow looks up the linked WhatsApp number. The reply is sent back to the customer on WhatsApp, preserving context. Result: two-way synced conversations without building a custom app. How to set it up Configure WhatsApp Cloud API Create a Meta Developer account and register a WhatsApp Business number. Generate an access token and phone number ID. Configure Telegram Bot Use BotFather to create a bot and enable it in a **Telegram Supergroup with Topics**. Get the chat_id and allow the bot to create/send messages in topics. Database (Supabase/Postgres) Create a table wa_tg_threads to map phone_e164 ↔ telegram_topic_id ↔ supergroup_id. n8n Workflows Workflow A: WhatsApp → Telegram Trigger: WhatsApp Webhook Steps: Lookup customer → If exists send to topic, else create topic → Save mapping → Forward message. Workflow B: Telegram → WhatsApp Trigger: Telegram Webhook Steps: Filter only topic replies → Lookup mapping → Send WhatsApp message. Testing Send a WhatsApp message → Check Telegram topic created. Reply in Telegram topic → Ensure customer receives WhatsApp reply. Requirements A free or paid n8n instance (self-hosted or cloud). WhatsApp Cloud API credentials** (phone number ID + access token). Telegram Bot token* with access to a Supergroup with Topics* enabled. A Postgres/Supabase database to store thread mappings. Basic familiarity with editing HTTP Request nodes in n8n. How to customize the workflow Brand personalization:** Pre-populate first message templates (thank you, order status, delivery updates). Routing rules:** Assign specific agents to certain topics by ID ranges. Integrations:** Extend to CRMs (HubSpot, Zoho) or support platforms (Freshdesk, Zendesk). Notifications:** Push high-priority WhatsApp queries into Slack/Teams for instant alerts. Archival:** Auto-close inactive topics after N days and mark customers as dormant. Why Telegram instead of building a new App The client's requirement was clear: **use an existing, reliable, and scalable chat platform** instead of building a new app from scratch. Telegram Supergroups with Topics** scale to 100,000+ members and millions of messages, making them ideal for managing 10k+ customer threads. Agents don't need to install or learn a new tool---they continue inside Telegram, which is fast, free, and mobile-friendly. Building a custom chat app would require authentication, push notifications, scaling infra, and UX---all solved instantly by Telegram. This decision **saves development cost, accelerates deployment, and provides proven scalability**. Why this improves support productivity Organized by customer:** Each WhatsApp number has its own Telegram topic. No missed messages:** Agents can quickly scroll topics without drowning in one endless chat. Two-way sync:** Replies flow back to WhatsApp seamlessly. Scales automatically:** Handle 10k+ conversations without losing track. Leverages existing tools:** WhatsApp (customers) + Telegram (agents). Result: **faster responses, better tracking, and zero need to reinvent chat software.**

Build your own Supabase and Telegram integration

Create custom Supabase and Telegram workflows by choosing triggers and actions. Nodes come with global operations and settings, as well as app-specific parameters that can be configured. You can also use the HTTP Request node to query data from any app or service with a REST API.

Supabase supported actions

Create
Create a new row
Delete
Delete a row
Get
Get a row
Get Many
Get many rows
Update
Update a row

Telegram supported actions

Get
Get up to date information about a chat
Get Administrators
Get the Administrators of a chat
Get Member
Get the member of a chat
Leave
Leave a group, supergroup or channel
Set Description
Set the description of a chat
Set Title
Set the title of a chat
Answer Query
Send answer to callback query sent from inline keyboard
Answer Inline Query
Send answer to callback query sent from inline bot
Get
Get a file
Delete Chat Message
Delete a chat message
Edit Message Text
Edit a text message
Pin Chat Message
Pin a chat message
Send Animation
Send an animated file
Send Audio
Send a audio file
Send Chat Action
Send a chat action
Send Document
Send a document
Send Location
Send a location
Send Media Group
Send group of photos or videos to album
Send Message
Send a text message
Send and Wait for Response
Send a message and wait for response
Send Photo
Send a photo
Send Sticker
Send a sticker
Send Video
Send a video
Unpin Chat Message
Unpin a chat message

FAQs

  • Can Supabase connect with Telegram?

  • Can I use Supabase’s API with n8n?

  • Can I use Telegram’s API with n8n?

  • Is n8n secure for integrating Supabase and Telegram?

  • How to get started with Supabase and Telegram integration in n8n.io?

Need help setting up your Supabase and Telegram integration?

Discover our latest community's recommendations and join the discussions about Supabase and Telegram integration.
Trigi Digital

Looking to integrate Supabase and Telegram in your company?

Over 3000 companies switch to n8n every single week

Why use n8n to integrate Supabase with Telegram

Build complex workflows, really fast

Build complex workflows, really fast

Handle branching, merging and iteration easily.
Pause your workflow to wait for external events.

Code when you need it, UI when you don't

Simple debugging

Your data is displayed alongside your settings, making edge cases easy to track down.

Use templates to get started fast

Use 1000+ workflow templates available from our core team and our community.

Reuse your work

Copy and paste, easily import and export workflows.

Implement complex processes faster with n8n

red iconyellow iconred iconyellow icon