AI-Powered Telegram Bot with Memory – n8n Automation Template

October 20, 2025

Aladuddin Aladin

This workflow creates an intelligent Telegram chatbot powered by OpenAI and enhanced with Supabase memory. Unlike standard bots, it remembers past interactions by linking each Telegram user to a unique OpenAI conversation thread. This ensures continuity and context, making conversations more natural and engaging.

Perfect for customer support, virtual assistants, education bots, or any use case where context retention is crucial.

Features

  • Telegram Integration
    • Instantly responds to messages from your custom Telegram bot.
  • Contextual Memory with Supabase
    • Stores telegram_id and openai_thread_id in a Supabase database.
    • Ensures the bot remembers past interactions for personalized conversations.
  • AI-Powered Conversations
    • Uses OpenAI Assistants API to generate intelligent, human-like replies.
    • Supports ongoing conversations by retrieving prior thread history.
  • Scalable Database Setup
    • Includes SQL script to create the telegram_users table in Supabase.
  • Easy Setup
    • Step-by-step notes included inside the workflow (Telegram BotFather setup, Supabase setup, OpenAI assistant creation).
    • Optional setup video for quick onboarding.

About the author

Alauddin Aladin is an AI Automation expert helping businesses streamline operations, boost productivity, and scale effortlessly using tools like Make.com and n8n. With over a decade of experience in digital systems and automation strategy, Alauddin empowers entrepreneurs to save time and grow smarter through intelligent workflows and AI-driven solutions.

Leave a Comment