Telegram Bot with Supabase memory and OpenAI assistant integration

SQL query to create table in Supabase: create table public.telegramusers ( id uuid not null default genrandomuuid (), datecreated timestamp with time zone not null default (now() at time zone 'utc'::text), telegramid bigint null, openaithreadid text null, constraint telegramuserspkey primary key (id) ) tablespace pgdefault;

Integrations Used (3)

Workflow Structure (10 nodes)
100%
Telegram Trigger
Get New Message
Supabase
Find User
If
If User exists
Http Request
OPENAI - Create thread
Supabase
Create User
Merge
Merge
Http Request
OPENAI - Send message
Http Request
OPENAI - Run assistant
Http Request
OPENAI - Get messages
Telegram
Send Message to User
Node Types:
trigger
http
default
logic
action
Requires credentials

Prerequisites

Required Credentials (3)

OpenAI

Used by: OPENAI - Create thread, OPENAI - Send message +2 more

Docs

Supabase

Used by: Create User, Find User

Docs

Telegram

Used by: Get New Message, Send Message to User

Docs

Multiple services required

This workflow needs 3 different credentials. Make sure you have accounts for all services before importing.

Complexity

Complex

Advanced features used. Requires n8n experience.

Setup time: ~40 min
Score: 48/100
Conditional Logic
4 Integrations

When to Use This Workflow

Streamline Team Communication

Automatically route notifications and updates to the right channels and people.

Reduce information overload while keeping everyone informed.

Real-time Response

React instantly when events happen - new orders, form submissions, or API calls.

Zero delay between trigger and action for time-sensitive workflows.

Error Reduction

Eliminate human error from routine processes with consistent automation.

Improve accuracy and reliability across your workflows.

workflow.json
{
  "nodes": [
    {
      "id": "9cc26a42-eb43-40c4-b507-cbaf187a5e15",
      "name": "Get New Message",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        1120,
        500
      ],
      "webhookId": "464f0a75-56d1-402f-8b12-b358452e9736",
      "parameters": {
        "updates": [
          "message"
        ],
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "id": "rI0zyfIYVIyXt2fL",
...

Workflow Details

Nodes
17
Trigger
Event
Source
awesome
Added
Dec 4, 2025

Need Help?

Check out the official n8n documentation for detailed guides.

Related Workflows

NeurochainAI Basic API Integration

ERROR

Telegram
Http-request
29 nodesEvent
Curated

Telegram AI Langchain bot

Generate an image with Dall-E 3 and send it via Telegram

Lmchatopenai
Memorybufferwindow
Telegram
Executeworkflow
12 nodesEvent
Curated

BillBot

Production-ready workflow: BillBot. This workflow has been optimized for production use with comprehensive error handlin...

Telegram
Http-request
Google-sheets
Twilio
7 nodesEvent

N8N Español - NocodeBot

Production-ready workflow: N8N Español - NocodeBot. This workflow has been optimized for production use with comprehensi...

Http-request
Telegram
8 nodesEvent

NeurochainAI Basic API Integration

Automated workflow: NeurochainAI Basic API Integration. This workflow integrates 7 different services: telegramTrigger,...

Telegram
Http-request
29 nodesEvent

NeurochainAI Basic API Integration

Automated workflow: NeurochainAI Basic API Integration. This workflow integrates 7 different services: telegramTrigger,...

Telegram
Http-request
29 nodesEvent