Templates / Reply to Telegram text and voice messages with an OpenAI GPT-4o-mini chatbot and memory

Reply to Telegram text and voice messages with an OpenAI GPT-4o-mini chatbot and memory

Needs changes

by TakatoYamada ✓ · 337 views · created 2026-05-30 · Support Chatbot, AI Chatbot

Needs changes. This template uses 1 thing(s) that n8n 3.0 removes: AI Agent v1 (old agent modes). 1 breaking item(s) found. Static check, last run 2026-10-19.

What to replace before upgrading

Removed in 3.0Replace with
AI Agent v1 (old agent modes)
AI Conversation Agent (v1.7)
Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.

Nodes used (10)

TelegramOpenAIAI AgentOpenAI Chat ModelSimple MemoryWikipediaCalculatorGoogle Sheets

What it does

Quick Overview This workflow listens for incoming Telegram messages, sends each message to an OpenAI chat model via an AI agent with per-chat memory, and replies in the same Telegram conversation with a concise, language-matched response. How it works 1. Triggers when a new Telegram message is received by your bot. 2. Sends the message text to an AI chatbot agent configured with a system prompt to respond concisely in the user’s language. 3. Uses the OpenAI GPT-4o-mini chat model to generate the response and a per-chat memory buffer keyed by Telegram chat ID to retain recent context. 4. Posts the generated reply back to the originating Telegram chat. Setup 1. Create a Telegram bot with BotFather, then add your Telegram bot credentials to the Telegram Trigger and Telegram reply nodes. 2. Add your OpenAI credentials and select the desired model in the OpenAI chat model node. 3. Ensure the workflow has access to store conversation context and adjust the memory window length or system message if needed.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.