Turn Telegram into a smart help channel that remembers each user. When someone messages your bot, their chat history is saved and reused so answers stay consistent and feel natural. Great for customer support, FAQs, and guided help without hiring more agents.
Here is how it runs. A Telegram trigger catches a new message. The workflow looks up the sender in a Supabase table using their Telegram ID. If the user is new, it creates a fresh OpenAI thread and stores both the Telegram ID and the thread ID in Supabase. A merge step makes sure the right thread ID is used every time. The message is posted to the OpenAI thread, the assistant is started with a set assistant ID, the latest reply is pulled from the thread, and the answer is sent back to the same user in Telegram. This design gives true memory by keeping one thread per user.
Setup needs a Telegram bot token, a Supabase project with the provided table, and an OpenAI assistant with an API key. Expect faster replies and fewer repeated questions. Teams can support many more chats at once while keeping context from one conversation to the next. Common uses include customer support, onboarding, account help, and status updates for orders or bookings.