Use this powerful n8n workflow to build a personal AI assistant on Telegram that handles both text and voice messages using OpenAI transcription and GPT-4.1-mini, leveraging the LangChain n8n node for context.
Download this n8n workflow template and start using it instantly.
Developers looking for complex n8n templates leveraging AI.
Users wanting a personal, context-aware AI assistant integrated directly into Telegram.
Automation specialists exploring multi-modal n8n workflow capabilities.
Teams needing robust n8n node configurations for natural language processing.
This sophisticated n8n workflow template solves the challenge of creating a multi-modal, stateful AI assistant within a messaging platform like Telegram. Instead of simple request-response actions, this n8n automation leverages the LangChain AI agent architecture combined with OpenAI's robust transcription capabilities. A critical feature is the inclusion of the Simple Memory n8n node, ensuring the AI remembers previous messages in the conversation—a key requirement for useful chatbots. Whether the user sends a text message or a voice note, this n8n workflow handles the input gracefully, processes it with a GPT-4.1-mini model, and returns a helpful, context-aware response directly to the user's Telegram chat. This complete n8n solution demonstrates the power of integrating communication platforms with advanced AI models.
The operational sequence of this complex n8n workflow is meticulously designed to handle varying input types while maintaining conversational context:
Telegram Trigger n8n node, which immediately initiates the n8n workflow whenever a new message (text or voice) is received in the configured Telegram chat.Switch n8n node determines the input type. It checks for the existence of either the message.text field (direct text input) or the message.voice.file_id field (voice note input).Telegram: Get a file n8n node to fetch the associated audio data. This file is then processed by the OpenAI: Transcribe a recording n8n node, converting the spoken words into a usable text string.Edit Fields n8n nodes. These nodes normalize the data, extracting the cleaned text message and the chat ID (which serves as the session identifier).AI Agent n8n node. This agent utilizes the powerful OpenAI Chat Model (configured as GPT-4.1-mini) for generating the sophisticated response.Simple Memory n8n node is connected to the AI Agent. It uses the user's chat ID as a session key, enabling the n8n workflow to maintain context across multiple turns, simulating a true conversation.Telegram: Send a text message n8n node, completing the execution of this robust n8n template.To set up this comprehensive n8n workflow, follow these steps:
Telegram Trigger and the two subsequent Telegram n8n nodes (Get a file and Send a text message). This typically requires a Bot Token from BotFather.Transcribe a recording and OpenAI Chat Model). Ensure you use an API key capable of utilizing the specified model (GPT-4.1-mini).Telegram Trigger n8n node must be activated and configured to listen for messages in your target chat or group.This n8n workflow utilizes several specialized n8n nodes to achieve its multi-modal functionality:
Telegram Trigger (n8n trigger):
Function: Serves as the starting point of the n8n workflow, initiating execution upon receiving a message update in Telegram.
Key Configuration: Listens specifically for 'message' updates.
Switch (n8n node):
Function: Directs the flow based on whether the incoming Telegram message contains message.text or message.voice.fileid.
Telegram: Get a file (n8n node):
Function: Executes on the voice path, downloading the actual audio file data using the provided fileid.
OpenAI: Transcribe a recording (n8n node):
Function: Converts the received voice recording into text, enabling the AI agent to process the user's request. This uses the OpenAI API.
Edit Fields / Edit Fields1 (n8n node):
Function: Standardizes the input format, extracting the cleaned text and setting the sessionId based on the Telegram chat ID, which is essential for session management in the n8n workflow.
AI Agent (n8n node):
Function: The core orchestration engine, combining the Language Model and Memory for contextual responses. It uses a defined system message to guide its personality.
OpenAI Chat Model (n8n node):
Function: The Large Language Model (GPT-4.1-mini) used by the AI Agent to generate responses to user queries within this n8n workflow.
Simple Memory (n8n node):
Function: Maintains conversational history for the AI Agent, using a buffer window length of 7 and the chat ID as the session key to ensure context persistence across multiple turns.
Telegram: Send a text message (n8n node):
* Function: The final action, sending the AI Agent's generated output back to the user's Telegram chat ID.
Deploy a GPT-4o powered n8n workflow that handles voice and text commands via Telegram. Automatically scrape leads using LangChain tools or generate deep research reports instantly.

Use this powerful n8n workflow to integrate Telegram voice and text commands with Home Assistant. Features AI intent analysis (Gemini), Whisper STT, and smart routing via the core n8n node components.

Deploy a comprehensive personal AI assistant using n8n. This advanced n8n workflow processes Telegram messages (text or voice), transcribes audio via Gemini, and manages Gmail, Google Calendar, and Notion tasks.

Deploy a powerful Voice AI Chatbot using this n8n workflow. Integrates OpenAI STT/TTS, Qdrant RAG, and guardrails for safe, context-aware, real-time voice responses on your WordPress site.

Deploy a powerful AI customer service solution for WooCommerce using a sophisticated n8n workflow. Integrates VAPI, GPT-4o, Google Gemini, and Qdrant RAG for order tracking and knowledge retrieval.









































