n8n workflow template · 10 nodes · Telegram
Telegram Bot with Supabase memory and OpenAI assistant integration is a free n8n workflow template that starts from the Telegram Trigger node and works with Telegram and Supabase. It has 10 nodes and no AI nodes. The notes inside the workflow say: “Many simple chatbots lack context awareness and user memory.” To run it, you add your own credentials for OpenAI API, Supabase API and Telegram Bot API.
The text below comes from the sticky notes inside the workflow. We removed links, code samples and anything that looks like a key or token.
Made by Mark Shcherbakov from community 5minAI
Many simple chatbots lack context awareness and user memory. This workflow solves that by integrating Supabase to keep track of user sessions (via telegram_id and openai_thread_id), allowing the bot to maintain continuity and context in conversations, leading to a more human-like and engaging experience.
This Telegram bot template connects with OpenAI to answer user queries while storing and retrieving user information from a Supabase database. The memory component ensures that the bot can reference past interactions, making it suitable for use cases such as customer support, virtual assistants, or any application where context retention is crucial.
Create own Telegram bot in Botfather bot
Create table in Supabase with SQL query
SQL query to create table in Supabase
Create assistant in OpenAI.
Specify own assistant id here
The text below comes from the sticky notes inside the workflow. We removed links, code samples and anything that looks like a key or token.
The 10 nodes in file order (sticky notes excluded). Branches and connections determine execution order in n8n:
Configure your own credentials after importing. Create each credential in n8n, then select it in the node.
Do you need somewhere to run it? Read our guide to self-hosted n8n.
We can adapt this workflow to your apps, data and process, then deploy and support it.
Contact Us