Telegram AI Agent with Memory and Image Generation
N8N
Project's Category
Intro
This one is a full conversational agent on Telegram, not just a chatbot that answers one message at a time. It remembers the conversation, figures out what the user actually wants, and can reply with either text or a generated image.
Problems
The client wanted a Telegram assistant that felt like talking to something that remembered the conversation, not a bot that forgot everything between messages and answered every question the same generic way.
Solutions
We built a five stage n8n pipeline. The first stage captures the incoming message and updates the session. The second pulls the full conversation history and retrieves whatever context is actually relevant to the current message, instead of dumping the whole history into every prompt. The third detects intent and picks the right prompt template based on what the user is asking for. The fourth runs everything through Gemini to generate the actual response. The fifth figures out whether the reply should be text or an image, cleans it up, and sends it back through Telegram.
Final Thoughts
The intent detection stage is doing more work than it looks like on the canvas. Routing to the right prompt template before generation, instead of one giant prompt trying to handle every case, is why the responses stay coherent across a long conversation.
Telegram AI Agent with Memory and Image Generation
N8N
Project's Category
Intro
This one is a full conversational agent on Telegram, not just a chatbot that answers one message at a time. It remembers the conversation, figures out what the user actually wants, and can reply with either text or a generated image.
Problems
The client wanted a Telegram assistant that felt like talking to something that remembered the conversation, not a bot that forgot everything between messages and answered every question the same generic way.
Solutions
We built a five stage n8n pipeline. The first stage captures the incoming message and updates the session. The second pulls the full conversation history and retrieves whatever context is actually relevant to the current message, instead of dumping the whole history into every prompt. The third detects intent and picks the right prompt template based on what the user is asking for. The fourth runs everything through Gemini to generate the actual response. The fifth figures out whether the reply should be text or an image, cleans it up, and sends it back through Telegram.
Final Thoughts
The intent detection stage is doing more work than it looks like on the canvas. Routing to the right prompt template before generation, instead of one giant prompt trying to handle every case, is why the responses stay coherent across a long conversation.
Building the automation systems that handles business processes.
Clear Communication
Reliable
Professional
Reliable Quality
Building the automation systems that handles business processes.
Clear Communication
Reliable
Professional
Reliable Quality



