Animated data flow diagram

AI Chatbot Agent for Telegram (Text & Voice)

Version: 1.0.0 | Last Updated: 2025-07-11

Integrates with:

Telegram OpenAI n8n
Core AI Power
7/10
Automation Level
8/10
Integration Reach
3 systems
Setup Simplicity
8/10
Adaptability
7/10

Overview

Unlock 24/7 Automated Conversations with this AI Agent

This workflow transforms your Telegram bot into a powerful, multimodal AI agent. It can understand and respond to users via both text and voice messages, providing a seamless and natural conversational experience. The agent is powered by OpenAI's GPT-4o, leveraging its advanced reasoning capabilities, and uses the Whisper API for highly accurate speech-to-text conversion. With built-in conversational memory, it can recall previous parts of the chat, leading to more helpful and contextually relevant interactions.

Key Features & Benefits

  • Multimodal Input: Engages users how they prefer, accepting both standard text and voice notes.
  • AI-Driven Conversations: Utilizes OpenAI's GPT-4o for smart, human-like responses.
  • Voice Recognition: Accurately transcribes spoken messages into text for the AI to process.
  • Conversational Memory: Remembers the last 10 interactions per user for context-rich conversations.
  • Customizable Persona: Easily edit the system prompt to define your agent's personality, tone, and instructions.
  • Robust Error Handling: Includes logic to automatically correct and resend messages with formatting issues.

Use Cases

  • Instantly answer customer questions on Telegram, 24/7, using either text or voice.
  • Automate lead qualification for your B2B SaaS by engaging prospects in natural conversation.
  • Create an internal helpdesk bot for your team to answer common questions about HR policies or IT support.
  • Offer a hands-free support option for e-commerce customers who prefer speaking over typing.

Prerequisites

  • An n8n instance (Cloud or self-hosted).
  • An OpenAI API Key with access to GPT-4o and the Whisper audio transcription model.
  • A Telegram Bot with its API Token.

Setup Instructions

  1. Import the workflow JSON into your n8n instance.
  2. Configure the 'Listen for incoming events' Telegram Trigger node with your Telegram Bot credentials.
  3. In the other Telegram nodes ('Download voice file', 'Send final reply', etc.), select the same credentials from the dropdown menu.
  4. Configure the 'OpenAI Chat Model' and 'Convert audio to text' nodes with your OpenAI API credentials.
  5. (Optional) Customize the systemMessage in the 'AI Agent' node to define your chatbot's persona and rules.
  6. Activate the workflow and start a conversation with your bot on Telegram to test it.

Tags:

AI AgentChatbotTelegramOpenAIn8n

Want your own unique AI agent?

Talk to us - we know how to build custom AI agents for your specific needs.

Request a Consultation