Telegram bots in n8n forget every user when the workflow execution ends. retainr adds long-term memory — your bot recalls every user across all past conversations. Install the community node in 30 seconds.
The Telegram Trigger in n8n fires a separate workflow execution for each incoming message. When the execution ends, all state is discarded. The next message — even from the same user — starts fresh. retainr stores memories between executions so your bot builds a persistent understanding of each user.
Settings → Community Nodes → Install → n8n-nodes-retainr. Add your retainr API key as a credential. Create a Telegram bot via @BotFather if you have not already.
Add a retainr Search Memory node after the Telegram Trigger. Namespace: tg:{user_id} (the Telegram user ID). Query: the incoming message text. Inject results into your AI prompt.
Add a retainr Store Memory node after your AI step. Namespace: same tg:{user_id}. Content: user message + AI response. The bot now remembers every user permanently.
n8n Telegram AI Agent with Long-Term Memory
Complete guide with full workflow setup and group bot patterns.
n8n WhatsApp AI Memory
Persistent memory for WhatsApp bots built in n8n.
n8n AI Agent Memory
The complete retainr integration guide for n8n.
n8n Memory Between Executions
All approaches to persistent memory in n8n workflows compared.
1,000 memory operations per month. Free forever. No credit card required.
Start free