Skip to main content

Build a multi-modal Telegram AI assistant with Gemini, voice & image generation

Workflow preview

Workflow preview
100%
Build a multi-modal Telegram AI assistant with Gemini, voice & image generation preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

How it works This workflow creates a multi talented AI assistant named Simran that interacts with users via Telegram. It can handle text and voice messages, understand the user's intent, and perfor...

Best for

  • Personal Productivity automation workflows
  • AI Chatbot automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.mongodb, @n8n/n8n-nodes-langchain.chainllm, n8n-nodes-base.code, n8n-nodes-base.if, n8n-nodes-base.switch, @n8n/n8n-nodes-langchain.lmchatgooglegemini, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.memorymongodbchat

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Iniyavan JC.

Original n8n.io source

1.1 Workflow description

Title
Build a multi-modal Telegram AI assistant with Gemini, voice & image generation
Workflow name
Build a multi-modal Telegram AI assistant with Gemini, voice & image generation

How it works

This workflow creates a multi-talented AI assistant named Simran that interacts with users via Telegram. It can handle text and voice messages, understand the user's intent, and perform various tasks. Step 1: Receive & Transcribe Input The workflow triggers on any new Telegram message. If it's a voice message, it uses AssemblyAI to transcribe it into text; otherwise, it processes the incoming text directly. Step 2: Understand User Intent Using a Large Language Model (LLM), the workflow analyzes the user's message to determine their goal, categorizing it as a general chat, a request to generate an image, a command to set a reminder, or a request to remember a specific piece of information. Step 3: Fetch Context & Route The assistant retrieves past conversation summaries from a MongoDB database to maintain context. Based on the user's intent, the workflow routes the task to the appropriate path. Step 4: Execute the Task Chat: Generates a response using an AI agent whose personality can be toggled between a standard assistant and a "Girlfriend Mode." It also analyzes the user's mood to tailor the response. Generate Image: Creates a detailed prompt and uses an image generation API to create and send a picture. Set Reminder: Parses the natural language request, creates an event in Google Calendar and a task in Google Tasks, and sends a confirmation. Remember Info: Saves specific user-provided information to a dedicated memory collection in MongoDB. Step 5: Respond and Save Memory The final output (text, voice message, or image) is sent back to the user on Telegram. The workflow then summarizes the interaction and saves it to the database to ensure continuity in future conversations.

Set up steps

Estimated Set up time: 20 - 30 minutes.

  1. Configure Credentials: You will need to add credentials for several services in your n8n instance: Telegram (Bot API Token) AssemblyAI (API Key) MongoDB Google (for Calendar, Tasks, Sheets, and Natural Language API) A Large Language Model (the workflow uses Google Gemini but can be adapted) An image generation service (the workflow uses the Together.xyz API)
  2. Set up External Services: Ensure your MongoDB instance has two collections: user_memory and memory_auto. Create a Google Sheet to manage the "Girlfriend Mode" status for different users. Ensure edge-tts is installed on the machine running your n8n instance for the text-to-speech functionality.
  3. Customize Nodes: Review the nodes with hardcoded IDs, such as Google Tasks and Google Sheets, and update them with your specific Task List ID and Sheet ID. The sticky notes inside the workflow provide more detailed instructions for specific nodes and segments.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Fetch User Memory2

Type / Role
n8n-nodes-base.mongoDb - mongoDb
Config choices
Version 1.1

Block 2 - Intent Analysis2

Type / Role
@n8n/n8n-nodes-langchain.chainLlm - chainLlm
Config choices
Version 1.7

Block 3 - Parse Intent2

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 4 - Extract Memory Info1

Type / Role
@n8n/n8n-nodes-langchain.chainLlm - chainLlm
Config choices
Version 1.7

Block 5 - Check If Worth Remembering1

Type / Role
n8n-nodes-base.if - if
Config choices
Version 1

Block 6 - Route Intent2

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 2

Block 7 - Google Gemini Chat Model7

Type / Role
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - lmChatGoogleGemini
Config choices
Version 1

Block 8 - Chat Agent2

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 2

Block 9 - MongoDB Chat Memory1

Type / Role
@n8n/n8n-nodes-langchain.memoryMongoDbChat - memoryMongoDbChat
Config choices
Version 1

Block 10 - intent string2

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 11 - Edit Fields4

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 12 - Convert to File

Type / Role
n8n-nodes-base.convertToFile - convertToFile
Config choices
Version 1.1

Block 13 - HTTP Request

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 14 - Edit Fields5

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 15 - Telegram Trigger1

Type / Role
n8n-nodes-base.telegramTrigger - telegramTrigger
Config choices
Version 1.2

Block 16 - reminder status confirmation1

Type / Role
@n8n/n8n-nodes-langchain.chainLlm - chainLlm
Config choices
Version 1.7

Block 17 - Telegram1

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 18 - Google Tasks

Type / Role
n8n-nodes-base.googleTasks - googleTasks
Config choices
Version 1

Block 19 - Google Calendar

Type / Role
n8n-nodes-base.googleCalendar - googleCalendar
Config choices
Version 1.3

Block 20 - Edit Fields6

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 21 - Build Context2

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 22 - Check Voice Message1

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2

Block 23 - Store Transcript ID1

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 24 - Wait 5 Seconds1

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1.1

Showing the first 24 of 95 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Build a multi-modal Telegram AI assistant with Gemini, voice & image generation
Complexity advanced
Nodes 95
Categories Personal Productivity, AI Chatbot
Author Iniyavan JC
Published 14 Jul 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/6003/6003.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Build a multi-modal Telegram AI assistant with Gemini, voice & image generation do?

How it works This workflow creates a multi talented AI assistant named Simran that interacts with users via Telegram. It can handle text and voice messages, understand the user's intent, and perfor...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Personal Productivity, AI Chatbot use case.