Build a Telegram Voice Support Agent Using n8n
Create a smart voice support agent in Telegram using n8n.
Imagine a customer sending a voice note to ask about a delivery. Your workflow transcribes the message, identifies the request, looks up authorised information, and sends a text response in Telegram.
n8n lets you connect these steps on a visual canvas. In this guide, you will learn how triggers, routing, transcription, an AI agent, and Google Sheets can work together in a Telegram support workflow.
This is a voice-note-to-text-reply workflow. It is not a live phone conversation or speech-to-speech system. For the wider picture, read The Complete Guide to Voice AI Agents.
Understanding n8n Workflows
An n8n workflow connects nodes that perform specific jobs. A trigger starts the workflow when an event occurs. Action nodes retrieve information, transform data, call a service, or send a response. Connections determine where data goes next.
You can start with a blank workflow or use a template from the n8n template library. Integrations can reduce custom coding, but you still need to configure credentials, permissions, error handling, and any service-specific rate limits.
What the Telegram Workflow Does
A Telegram Trigger receives a message.
A Switch or If node routes text and voice messages to separate paths.
The voice path downloads the recording and transcribes it.
Both paths prepare a common text input for the AI Agent.
The agent uses a connected model and, when appropriate, a Google Sheets tool to retrieve approved information.
A Telegram node sends the response to the original chat.
The example can answer general support questions and look up public payment offers. Customer-specific order details require a separate, reliable identity verification and authorisation layer before any private data is returned.
Before You Start
An n8n instance and an externally reachable HTTPS webhook URL for Telegram. n8n Cloud provides a hosted URL; a self-hosted instance must be reachable by Telegram.
A Telegram bot token created through BotFather. Store it in n8n credentials rather than in expressions or messages.
Credentials for a supported speech-to-text service and a chat model. This guide uses n8n's OpenAI integration as an example.
Google Sheets credentials and a test spreadsheet shared with the account used by n8n. Start with fictional order data and non-sensitive offers.
A separate test bot if you need to keep a production workflow running while testing. Telegram permits one webhook per bot, so test and production registrations can replace each other.
Step 1: Receive Messages with Telegram Trigger
Add Telegram Trigger, select your Telegram credentials, and choose the Message update. Run the trigger in test mode and send the bot a text message. Inspect the output to confirm the message and chat fields.
Telegram's update includes a chat ID, normally under message.chat.id. Preserve this value throughout the workflow so the response goes to the same chat. The exact data available depends on the update type. A trigger handles selected updates, not every possible Telegram event automatically.
Step 2: Route Text and Voice
Add a Switch node after the trigger. Create one rule for an existing message.text field and another for an existing message.voice.file_id field. Add a fallback for unsupported messages, such as photos or stickers, with a helpful reply asking for text or a voice note.
On the text path, use Edit Fields (Set) to create a common field such as userText from the message text. Keep the chat ID and any identifiers needed by later steps.
Step 3: Download and Transcribe the Voice Note
On the voice path, add a Telegram node, select File → Get File, and map the incoming voice
file_id. Enable the download option if shown in your node version. Confirm the output contains the actual audio as binary data, not only file metadata.Add an OpenAI node with the audio transcription operation available in your installed version. Select the binary input field produced by the download, commonly
data, and configure your credentials. Check the operation's available transcription models and supported audio formats in the current node and provider documentation.Add Edit Fields (Set) to map the transcription output into the same
userTextfield used by the text path. Preserve or reference the original chat ID from the trigger.
Test with a short voice note and inspect the binary file and transcription output before proceeding. If the service rejects the file, check its format, size, credentials, and the node's binary field setting. A separate node called “Voice Node” is not required; it was a descriptive name for a formatting step.
Step 4: Configure the AI Agent
Connect both prepared paths to an AI Agent node. Configure its prompt input to use userText, and connect an appropriate chat model through the model port. Connect at least one tool if using the Tools Agent configuration; for a simple reply without tools, a basic model chain may be sufficient.
Give the agent a clear instruction, such as: “Answer using the information provided by approved tools. If information is missing, say so and offer a human handoff. Do not invent order status or offers.”
If conversation continuity is needed, connect a memory node and configure a session key that separates users, such as an appropriate Telegram chat or user identifier. Review storage, retention, and concurrent execution needs before using simple memory in production. Memory is optional and should never be used as proof of a customer's identity.
Step 5: Connect Google Sheets
Create a test sheet with public offers, including columns such as offer_id, description, valid_from, and valid_until. Add a Google Sheets node as a tool to the AI Agent, select the document and sheet, and configure a read operation such as Get Row(s). Describe the tool clearly so the agent knows what it can retrieve.
For order data, establish a separate verified link between the requester and their account. Enforce access and filter records in trusted workflow logic or an authorised backend before returning results. Do not expose an entire customer spreadsheet to an agent and rely on the prompt to prevent cross-customer disclosure. Google Sheets can work for a prototype; production order data may require a controlled backend and stronger access controls.
Test expired offers, missing rows, and incorrect or unauthorised identifiers. The workflow should return a safe fallback or route the user to support rather than guessing.
Step 6: Send a Telegram Reply
Connect the agent's output to a Telegram node using Message → Send Message. Map the original chat ID from the Telegram Trigger and the agent's final output to the message field. Use n8n's expression editor and inspect the actual node output to select the right field names.
Send a test text message and a voice note. Confirm that both return a reply to the correct chat and that unsupported inputs receive the fallback response.
Step 7: Test and Publish
Test text, clear voice, noisy audio, unsupported messages, missing data, and failed service calls.
Check that one user's conversation and data cannot appear in another user's reply.
Set limits for audio size, workflow duration, model usage, and repeated tool calls. Define a human handoff and an error response.
Review execution logs and retention settings because messages, transcripts, and tool outputs can contain personal information.
Once tested, save and publish or activate the workflow using the controls in your n8n version. Test the production webhook separately.
Node names, interface labels, and model options may vary by n8n version. This guide is checked against documentation, but the workflow has not been executed with your credentials or environment.
Product Decisions to Make Before Launch
Success: Measure correct responses, time to resolution, successful handoffs, and the percentage of users who need to repeat their request.
Quality: Review transcription accuracy across accents, background noise, and languages. Test whether the agent cites current data and acknowledges uncertainty.
Cost: Track transcription, model, tool, and n8n infrastructure costs per resolved request, including retries and human review.
Safety: Define who can access order data, which questions require verification, and which actions require a human decision.
Conclusion
A Telegram voice-note assistant is a practical way to explore n8n's visual workflows. The core pattern is straightforward: receive a message, route it, transcribe voice when needed, retrieve authorised data, and send a response.
Start with a small test dataset and a narrow use case. Add customer-specific information only after identity verification, access controls, and fallback paths are in place.
Official Resources
Found this useful? You might enjoy this as well

120 AI Terms Every Product Manager Should Know in 2026
A definitive AI glossary for product managers in 2026. Learn 120 essential AI terms from LLMs and RAG to AI agents and context engineering explained clearly for non-technical PMs.

The ChatGPT Deep Research Guide: How to Replace 4 Hours of Work With One Well-Crafted Prompt
Learn how to use ChatGPT Deep Research to compress hours of manual research into a single prompt. Step-by-step guide with real examples and proven techniques.
.png&w=1200&q=75)
Product Manager's Perplexity Guide: Real-Time Market Mapping and Rival Tracking
Master Perplexity AI as a product manager. Learn to run competitive research, synthesize user feedback, and accelerate decision-making with AI-powered search built for PMs who ship faster.
