This workflow is perfect for developers, chatbot enthusiasts, and businesses interested in building a dynamic Telegram bot with memory capabilities. The bot uses OpenAI's assistant for interactions and integrates with Supabase to store user data, enabling personalized conversations.
Many basic chatbots lack memory and context awareness. This workflow solves that issue by integrating Supabase to track user sessions (using telegram_id
and openai_thread_id
), allowing the bot to remember past interactions, creating a more engaging and human-like experience.
This Telegram bot template connects with OpenAI to respond to user queries while storing and retrieving user information from Supabase. The memory component allows the bot to reference previous interactions, making it suitable for customer support, virtual assistants, or any application where context retention is valuable.
telegram_id
.telegram_id
and openai_thread_id
if the user is new.openai_thread_id
.SUPABASE_URL
and SUPABASE_KEY
.telegram_users
with the following SQL query:CREATE TABLE public.telegram_users (id UUID NOT NULL DEFAULT gen_random_uuid(), date_created TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT (now() at time zone 'utc'::text), telegram_id BIGINT NULL, openai_thread_id TEXT NULL, CONSTRAINT telegram_users_pkey PRIMARY KEY (id)) TABLESPACE pg_default;
OPENAI_API_KEY
.Your connected stack awaits to automate AI workflows with 24-7 uptime performance and engagement
"I highly recommend Rantir, they are a great dev team with quick turn around on all projects and requests. We recently worked with them on updating our website and any changes, updates or modifications I needed were always taken care of quickly!"
"The team at Rantir has lived up to every definition of the word "partner". They're adaptive, fast, and flexible (all the things you'd hope for). We're so thrilled with what we've accomplished so far and look forward to working alongside them in the future."
"Working with the Rantir team was a pleasure. They guided us through the whole process from design to implementation, creating a great site on a tight deadline. They were responsive and adaptable throughout, and we'd be happy to work with them again in the future."
"Working with the Rantir team early on made combined design and development with early conversations to implement AI within Onder. We were happy to work together to help bring no-code, with code and AI."
Rantir University for learning how to build powerful AI Agents & Software you own.