Skip to main content

Conversational Telegram bot with GPT-5/GPT-4o for text and voice messages

Workflow preview

Workflow preview
100%
Conversational Telegram bot with GPT-5/GPT-4o for text and voice messages preview
Open on n8n.io

Important notice

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

1. Workflow Overview

This n8n workflow leverages a Telegram Message Trigger to activate an intelligent AI Agent capable of processing both text and voice messages. When a user sends a message in text or in voice format...

Best for

  • Support Chatbot automation workflows
  • AI Chatbot automation workflows
  • intermediate n8n builders looking for reusable templates

Tools used

n8n-nodes-base.telegramtrigger, @n8n/n8n-nodes-langchain.lmchatopenai, @n8n/n8n-nodes-langchain.memorybufferwindow, n8n-nodes-base.telegram, n8n-nodes-base.switch, @n8n/n8n-nodes-langchain.openai, @n8n/n8n-nodes-langchain.agent, n8n-nodes-base.set

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Conversational Telegram bot with GPT-5/GPT-4o for text and voice messages
Workflow name
Conversational Telegram bot with GPT-5/GPT-4o for text and voice messages

This n8n workflow leverages a Telegram Message Trigger to activate an intelligent AI Agent capable of processing both text and voice messages. When a user sends a message in text or in voice format, the workflow captures and transcribes it (if necessary), then passes it to the AI Agent for understanding and response generation.

To enhance user experience, the bot also displays a typing indicator while processing requests, simulating a natural, human-like interaction.

Key Features

  • Multi-Modal Input: Supports both text messages and voice notes from users.
  • Real-Time Interaction: Shows a “typing…” action in Telegram while the AI processes the input.
  • AI Agent Integration: Provides intelligent, context-aware, and conversational responses.
  • Seamless Feedback Loop: Replies are sent directly back to the user within Telegram for smooth interaction.

How It Works

  • The workflow triggers whenever a message or voice note is received on Telegram.
  • If the input is a voice note, the workflow transcribes it into text.
  • The text input is sent to the AI Agent for processing.
  • While processing, the bot sends a typing indicator to the user.
  • Once the AI generates a response, the workflow sends it back to the user in Telegram.

Setup Instructions

  1. Create a Telegram Bot:
    • Use @BotFather to create a bot and obtain your bot token.
  2. Configure n8n Credentials:
    • Add Telegram API credentials in n8n with your bot token.
    • Add credentials for any speech-to-text service used for voice transcription (e.g., Open AI Transcribe A Recording).
  3. Import the Workflow:
    • Import this workflow into your n8n instance.
    • Update all credential nodes to use your Telegram and transcription service credentials.
  4. Set Webhook URLs:
    • Ensure Telegram webhook is set properly for your bot to receive messages.
    • Make sure your n8n instance is publicly accessible for Telegram callbacks.
  5. Test the Workflow:
    • Send text messages and voice notes to your Telegram bot and observe the AI responses.

Customization Guidance

  • Add new message handlers: Extend the workflow to handle additional message types (images, documents, etc.).
  • Improve transcription: Swap or add speech-to-text services for better accuracy or language support.
  • Enhance AI Agent: Customize prompts and context management to tailor the AI’s personality and responses.
  • AI Model Flexibility: Swap between different AI models (e.g., GPT-5, GPT-4, Claude, or custom LLMs) based on task type, cost, or performance preferences. By default, I use GPT-4o in this template. However, you can use the latest GPT-5 model by changing them in OpenAI Chat Model Node. It will show you a list of all the available models to choose.
  • Tool-Based Control: Add custom tools to the AI Agent such as calendar access, Notion, Google Sheets, web search, database queries, or custom APIs—allowing for dynamic, multi-functional agents

Security and Implementation

  • Notes The Telegram node manages message reception and sending but does not directly handle AI processing.
  • Voice transcription requires integration with external APIs; secure those credentials in n8n and monitor usage.
  • To simulate typing, the workflow uses Telegram’s “sendChatAction” API method, providing users with feedback that the bot is processing.
  • Ensure your AI API keys and Telegram tokens are securely stored in n8n credentials and not exposed in workflows or logs.

Benefits

  • Handles natural conversational inputs with text or voice.
  • Provides a smooth, engaging user experience via typing indicators.
  • Easy integration of advanced AI conversational agents with Telegram.
  • Flexible for personal assistants, helpdesks, or interactive chatbots.

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 - Telegram Trigger

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

Block 2 - OpenAI Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

Block 3 - Simple Memory

Type / Role
@n8n/n8n-nodes-langchain.memoryBufferWindow - memoryBufferWindow
Config choices
Version 1.3

Block 4 - Get Voice

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

Block 5 - Text Or Voice

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

Block 6 - Transcribe The Voice

Type / Role
@n8n/n8n-nodes-langchain.openAi - openAi
Config choices
Version 1.8

Block 7 - AI Agent

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

Block 8 - Typing Action

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

Block 9 - Send Response To Telegram

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

Block 10 - Send Context To AI Agent

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

Block 11 - Send Transcribe Context To AI Agent

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

3. Summary Table

Workflow Conversational Telegram bot with GPT-5/GPT-4o for text and voice messages
Complexity intermediate
Nodes 11
Categories Support Chatbot, AI Chatbot
Author Roninimous
Published 05 Jun 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/4696/4696.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 Conversational Telegram bot with GPT-5/GPT-4o for text and voice messages do?

This n8n workflow leverages a Telegram Message Trigger to activate an intelligent AI Agent capable of processing both text and voice messages. When a user sends a message in text or in voice format...

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 Support Chatbot, AI Chatbot use case.