Multimodal Telegram AI Assistant with Conversational Memory and Dynamic Tools - n8n Workflow

Deploy J.A.R.V.I.S., a powerful multimodal AI assistant, using this comprehensive n8n workflow. Supports image analysis, voice transcription, document RAG, and web search integration via OpenAI.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

AI Developers and Enthusiasts: Those looking to deploy complex, tool-using AI agents.
Automation Specialists: Users needing sophisticated conversational AI within an n8n workflow structure.
Businesses: Organizations wanting to implement intelligent, context-aware customer service or information retrieval bots on Telegram.
Users of n8n templates: Individuals seeking ready-to-use, powerful automation solutions.

Overview

This comprehensive n8n workflow, dubbed 'J.A.R.V.I.S.', transforms a standard Telegram bot into a sophisticated, multimodal AI assistant. The core value of this n8n template is its ability to dynamically handle various input types—text, voice, images, and uploaded documents—routing them appropriately for processing by a powerful AI agent. By leveraging the flexibility of the n8n node ecosystem, specifically the LangChain integration nodes, the agent gains conversational memory and access to a suite of tools, including Google Search (SerpAPI), Web Scraper (Jina AI), and a temporary Retrieval-Augmented Generation (RAG) knowledge base for document referencing. This ensures the assistant provides context-aware, up-to-date, and accurate responses, demonstrating the incredible power achievable within a single n8n automation framework.

How it Works

The n8n workflow initiates with the Receive Message n8n trigger node whenever a user sends input to the configured Telegram bot.


  1. Input Routing: The Switch n8n node examines the incoming message payload to determine the message type (image, voice, text, or document) and directs the flow down the appropriate processing path.

  2. Voice Processing: If voice is detected, the audio file is downloaded, and the Transcribe n8n node (using OpenAI Whisper) converts it to text, which is then sent to the main AI agent.

  3. Image Processing: If an image is detected, it is downloaded and the Analyze Image n8n node (using OpenAI Vision models) generates a description or answers questions based on the image content.

  4. Document Processing (RAG): If a document is uploaded, the n8n workflow downloads it, processes it through document loading, token splitting, and OpenAI embeddings (Embeddings OpenAI1), storing the content in the Simple Vector Store. This temporary vector store acts as a specialized RAG tool available to the core AI agent.

  5. Core AI Agent: Processed text inputs (from transcription, image analysis, RAG setup, or direct text chat) converge into the J.A.R.V.I.S. n8n node (an AI Agent). This agent utilizes the OpenAI Chat Model, Window Buffer Memory for ongoing conversation, and multiple external tools like Google Search and the temporary vector store tool.

  6. Tool Execution: The J.A.R.V.I.S. agent determines if external knowledge is needed (e.g., using Basic Google Search or the Image Generator tool) and executes the necessary steps.

  7. Response Generation: The final output from the agent is evaluated by the If Audio Response n8n node. If the initial input was a voice message, the response is routed to the Generate Audio n8n node (OpenAI TTS) and sent back as audio via the Audio Response Telegram n8n node. Otherwise, the message is split for length (Split MSG code n8n node) and sent as text via the Text Response Telegram n8n node.

Installation Guide

To deploy this powerful n8n workflow template, follow these setup steps:


  1. Import: Copy the provided JSON data and import it directly into your n8n instance.

  2. Telegram Setup: Configure the Receive Message n8n trigger node and all subsequent Telegram n8n nodes with your bot token obtained from BotFather.

  3. OpenAI Credentials: Add your OpenAI API key credentials to the relevant n8n node integrations: Analyze Image, Transcribe, Generate Audio, OpenAI Chat Model, and the Image Generator tool.

  4. SerpAPI Key: Configure the credentials for the Basic Google Search tool node to enable real-time web search capabilities within the n8n workflow.

  5. Jina AI Key: Update the API Setup Set n8n node with your Jina AI API key. This key is dynamically used by the Webpage Scraper HTTP Request tool node to scrape website content for the AI agent.

  6. Activation: Ensure all connections are correct and then activate the n8n workflow.

Node Details

Receive Message (Telegram Trigger n8n trigger): This is the entry point for the entire n8n workflow. It listens for message updates from Telegram.
Switch (Core Logic n8n node): Acts as a router, checking the incoming message JSON for the presence of photo, voice, text, or document fields to determine the input type.
J.A.R.V.I.S. (AI Agent n8n node): The brain of the operation. Configured with a sophisticated system prompt, it coordinates information flow, utilizes the Window Buffer Memory for context, and orchestrates actions using multiple connected tools.
Analyze Image (OpenAI n8n node): Uses OpenAI's vision model (like gpt-4o-mini) to process and describe images uploaded by the user.
Transcribe (OpenAI n8n node): Converts voice messages received from Telegram into text, making them usable by the AI agent.
Simple Vector Store & Embeddings OpenAI1 (RAG Setup n8n nodes): These nodes handle the temporary storage of document content. The document is embedded using the OpenAI embedding model, stored, and then retrieved as a tool by the main J.A.R.V.I.S. agent.
Basic Google Search (SerpAPI Tool n8n node): Provides the AI agent with real-time access to the internet for queries requiring current information.
Image Generator (Tool HTTP Request n8n node): Configured as a tool using OpenAI DALL-E 3 API to allow the agent to generate images based on prompts.
If Audio Response (If n8n node): Checks if the original message was a voice note. This crucial logic determines whether the final reply should be delivered as text or synthesized audio.
Generate Audio (OpenAI n8n node): Uses OpenAI TTS functionality (Text-to-Speech) to create an audio file response if required by the n8n workflow logic.

Related n8n Workflows

Free

Nodes: 19 Nodes
Updated: December 26 2025
View all
Created by

AI Systems Architect with 18+ years experience designing scalable, intelligent automation solutions. I specialize in architecting complex n8n workflows that integrate AI systems, streamline operations, and optimize business processes. My expertise spans multi-agent architectures, data automation, and enterprise-grade systems that adapt to evolving business needs. I help organizations unlock their potential through strategic technology implementation and innovative automation solutions.

Featured*