Build a versatile conversational AI Telegram bot using this advanced n8n workflow. Integrate Telegram with Google Gemini 2.5 Flash for intelligent text responses, image analysis, and full conversation memory using this robust n8n template.
Download this n8n workflow template and start using it instantly.
Automation Engineers: Seeking ready-to-use n8n templates for complex AI integrations.
Community Managers: Needing an automated, intelligent response system for a Telegram channel.
Developers: Interested in implementing multi-modal AI (text and image) logic within an n8n environment.
Bot Builders: Users who need a complete, scalable n8n workflow solution for Telegram.
This comprehensive n8n workflow provides a powerful solution for deploying an intelligent Telegram bot capable of handling modern, multi-modal communication. Unlike simple bots, this sophisticated automation uses Google Gemini 2.5 Flash to process both standard text messages and user-uploaded images, offering rich visual analysis.
Key to the success of this n8n workflow is the integrated conversation memory, ensuring the bot remembers the context of the previous 20 messages, leading to highly relevant and natural dialogue. The entire automation is designed to be highly responsive, utilizing the n8n trigger for Telegram to instantly begin processing user requests, routing the message type, and delivering a well-formatted, context-aware reply through the final n8n node action. This robust n8n template dramatically reduces the complexity of building advanced conversational agents.
This n8n workflow initiates immediately upon receiving a message via the Telegram platform.
Route Types switch n8n node analyzes the incoming JSON data to determine if the message contains plain text or an image (photo).Map text prompt Set n8n node formats the user's message for the AI agent.Get a file Telegram n8n node downloads the image using the provided file ID.Analyze image Google Gemini n8n node processes the binary file data, generating a detailed description of the image content.Map image prompt Set n8n node combines the generated image description with the user's caption (if available) into a single, cohesive prompt.Knowledge Base Agent n8n node. This agent utilizes the powerful Google Gemini Chat Model and maintains context via the Simple Memory n8n node, which stores the last 20 messages tied to the conversation's ID. The prompt ensures the output is well-formatted for Telegram.Send a text message Telegram n8n node, delivering the conversational response directly back to the user's chat ID.To deploy this powerful n8n workflow, follow these steps:
Telegram Trigger, Get a file, and Send a text message nodes are linked to your Telegram credentials, and the Analyze image and Google Gemini Chat Model nodes are linked to your Google Gemini credentials. Telegram Trigger (n8n trigger): The entry point of the n8n workflow, capturing all message updates from the connected Telegram bot.
Route Types (Switch n8n node): Determines the execution path based on whether the incoming message contains text or a valid image payload.
Get a file (Telegram n8n node): Downloads the image file from Telegram using the provided file ID, preparing it for AI analysis.
Analyze image (Google Gemini n8n node): Uses the Gemini 2.5 Flash model for multi-modal vision analysis, turning the binary image data into a descriptive text prompt.
Map image prompt / Map text prompt (Set n8n nodes): Standardize the input data structure for the AI agent, combining image descriptions and captions into a unified query.
Google Gemini Chat Model (LLM n8n node): Serves as the large language model backend for the agent, providing the intelligence for the conversational responses.
Simple Memory (AI Memory n8n node): Manages the conversational context, crucial for maintaining coherence across multiple interactions within this complex n8n workflow.
Knowledge Base Agent (Agent n8n node): The core logic engine that takes the user prompt, utilizes memory, and directs the LLM to generate the final, formatted reply.
Automate lead generation on Telegram using this powerful n8n workflow. Gate access to resources, check subscriptions, and deliver multi-stage upsell sequences. Use this n8n template to grow your community.

Deploy a powerful AI Q&A bot using this comprehensive n8n workflow. It handles text and voice input (via Mistral transcription) and performs real-time RAG using Linkup web search. This complete n8n template streamlines support.

Use this powerful n8n workflow to deploy a Telegram mental health assistant leveraging GPT-4o. Get empathetic validation, coping mechanisms, or insights based on user input tags like #vent, #cope, or #insight.

Build a sophisticated AI voice chatbot using this powerful n8n workflow. It combines ElevenLabs for voice functionality, an n8n Agent for routing, and multiple InfraNodus Graph RAG experts for specialized knowledge retrieval. Get started with n8n templates.

Automate weekly AI trend analysis using an n8n workflow. Scrape arXiv, classify papers with LLMs, embed them in Weaviate, and use an n8n agentic RAG system to generate and email a concise trend report.








































