Context
A Telegram bot that translates texts, works in a dialogue and remembers context.
Problem
Users send incomplete requests: without a text or without a target language. A regular bot breaks in such cases.
Solution
An AI Agent that recognizes three scenarios: everything is given — it translates; no target language — it asks to clarify; no text — it asks to clarify.
Process
- Prompt design — logic for the three scenarios.
- API integration — Telegram Trigger, Telegram Send Message, LLM; Simple Memory separately for each Telegram chat.
- n8n workflow — Telegram Trigger → AI Agent (+ Simple Memory) → Telegram Send Message. The workflow is activated and connected to an Error Workflow.
Results
- Dialogue scenarios the bot handles: 3
- Memory window: at least 6 messages per chat
- Error handling: Error Workflow connected
- Response speed: 7-10 seconds
Tech Stack
n8n, Telegram Bot API, AI Agent, Simple Memory, Error Workflow
Screenshots / Workflow / Video
https://www.loom.com/share/099620c9516647b685de6931a1471a20
