n8n

How to Automate Telegram Voice and Chat Support?

Turn your Telegram bot into a smart assistant that answers both text and voice messages. It is designed for customer support and community replies where fast answers and simple setup matter.

Incoming messages are captured from Telegram and checked for type. If the message is a voice note, the file is downloaded and converted to text using OpenAI. Text and voice transcripts are merged into a single prompt and sent to an AI Agent powered by a GPT model. The AI remembers recent context for each chat so replies make sense over several messages. A typing indicator is sent to show progress. The reply is cleaned to avoid Telegram formatting issues and then delivered to the user. If someone sends an unsupported command, a friendly error message is sent instead.

You only need a Telegram bot token and an OpenAI API key. Expect faster first responses and the ability to handle more chats without extra staff. It works well for FAQs, product info, basic troubleshooting, appointment details, and group moderation support.

What are the key features?

  • Telegram event trigger listens to all incoming updates to capture user messages
  • Content type switch routes text, voice, or unsupported inputs to the right path
  • Voice file download and OpenAI transcription convert audio to clean text
  • Set node combines user text or transcript with helpful metadata for the AI
  • AI Agent powered by a GPT model generates answers with a 10 message memory window
  • Typing action sends real time feedback so users know a reply is coming
  • HTML sanitizing prevents broken formatting and special character issues in Telegram
  • Final reply delivers the AI output and a friendly confirmation, with a fallback error message for unsupported commands

What are the benefits?

  • Reply to customers in under 10 seconds with automated responses and a visible typing indicator
  • Reduce manual triage by automatically routing voice and text into one AI flow
  • Handle up to 3 times more inquiries with AI generated answers and short term chat memory
  • Eliminate Telegram formatting errors by sanitizing special characters before sending
  • Keep context across 10 recent messages to improve answer relevance

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with Telegram and OpenAI. See the Tools Required section above for links to create accounts with these services.
  3. Create a Telegram bot in the Telegram app by chatting with BotFather and copy the bot API token.
  4. In n8n, open the Credentials page and create new Telegram credentials. Paste the bot API token and save.
  5. Open the Telegram Trigger node and select your Telegram credential. Keep updates set to all so it catches text and voice.
  6. Double click the Telegram nodes that send messages and choose the same Telegram credential to ensure all send steps are authorized.
  7. Create an OpenAI API key in your OpenAI account. In n8n Credentials, create a new OpenAI credential and paste the API key.
  8. Open the Convert audio to text node and select your OpenAI credential. Keep language auto and temperature as set, then save.
  9. Open the OpenAI Chat Model and AI Agent nodes and select the same OpenAI credential. Leave the model set to GPT 4o for balanced quality and speed.
  10. Check the Window Buffer Memory node. The session key is already tied to the Telegram chat id and keeps the last 10 messages for context.
  11. Enable the workflow and send your bot a text message. You should see a typing indicator and then a reply.
  12. Send the bot a voice note. Confirm it downloads the file, transcribes it, and returns an AI generated answer. If you see formatting errors, verify the HTML parse mode and the sanitizing step are active.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

OpenAI

Sign up

Pay-as-you-go: GPT-5 at $1.25 per 1M input tokens and $10 per 1M output tokens

Telegram

Sign up

Free: $0, Telegram Bot API usage is free for developers

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.