Blog · · 4 min read

How to transcribe voice notes with AI in n8n and reply automatically (Telegram and WhatsApp)

A step-by-step guide to turning your customers' voice messages into text with n8n's OpenAI node, so an AI agent can reply in writing. No coding needed.

More and more customers would rather send a voice note than type. For a small business that's a problem: you can't always listen right away, and a regular chatbot only understands text, so voice messages go unanswered.

In this guide you'll build an n8n workflow that receives the voice note, turns it into text with AI and hands it to your agent so it can reply in writing. We'll use Telegram, which is the easiest to test, and at the end you'll see how to move it to WhatsApp.

What you'll build

A five-part workflow:

  1. Telegram Trigger: receives every message sent to your bot.
  2. IF: checks whether the message is a voice note or text.
  3. Telegram (download file): fetches the audio from Telegram's servers.
  4. OpenAI (transcribe): turns the audio into text.
  5. AI Agent + reply: the agent reads the text and answers the customer.

If you don't have a Telegram bot connected to n8n yet, start with the Telegram AI bot guide and come back.

Step 1: tell voice notes from text

After the Telegram Trigger, add an IF node. The condition is simple: check whether the field message.voice.file_id exists. It only appears when the customer sends a voice note.

  • True branch: it's audio, so continue with steps 2 and 3.
  • False branch: it's plain text, so send it straight to the agent.

That way the same bot understands both.

Step 2: download the audio

On the audio branch, add a Telegram node with the File resource and the Get operation. In File ID, use an expression pointing to message.voice.file_id and keep the Download option on. The node returns the audio as a file (n8n calls this binary data), ready for the next step.

Keep in mind that Telegram limits the size of files a bot can download. That's fine for normal voice notes; for very long recordings, ask the customer to split them.

Step 3: turn it into text with AI

Add the OpenAI node, choose the Audio resource and the Transcribe a Recording operation. Connect your OpenAI credentials and, in the file field, enter the name of the binary data coming from the previous step (usually data).

Optionally, set the audio language. If all your customers speak English, setting it helps produce a cleaner transcript.

The result is a text field with what the customer said. From here on, the voice note is just another written message.

Step 4: let the agent reply

Merge both branches (the text one and the transcribed audio one) into an AI Agent node. The easiest way is to add an Edit Fields (Set) node on each branch that puts the message in a field with the same name, for example text. That way the agent always reads from the same place.

In the agent, connect your model, a memory so it remembers the conversation (use the chat ID as the key) and clear instructions. For a good starting point, see the customer service AI agent prompt.

A tip for the instructions: add something like "The message may come from an automatically transcribed voice note and contain small mistakes; if something is unclear, ask the customer to clarify instead of guessing." It prevents wrong answers caused by one misheard word.

Finish with a Telegram node (Send Message) that replies to the same chat with the agent's text.

And on WhatsApp

The idea is the same with the official WhatsApp API. When a customer sends audio, the message carries a media ID instead of text. With the WhatsApp Business Cloud node and its Media resource you fetch and download that file, and from there it's the same: transcribe with OpenAI, agent and reply.

If you haven't connected WhatsApp yet, see the guide to connect the WhatsApp Cloud API to n8n and the WhatsApp AI agent guide.

Cost and privacy

  • Cost: transcription is billed per minute of audio. Voice notes are usually short, so the cost is small, but check current pricing on your provider's website.
  • Privacy: voice notes can contain personal data. Tell your customers in your privacy policy that you use an external service to process messages, and don't keep recordings longer than needed.
  • Errors: turn on Retry On Fail in the OpenAI node and set up an alert in case something breaks, as explained in n8n error handling: alerts and retries.

Ideas to take it further

  • Your own voice notes: send yourself a voice note with an idea or task and have n8n save it to a sheet or turn it into tasks, like in meeting to tasks.
  • A daily summary of the voice notes you received with the daily AI summary report.
  • Hand off to a person when a voice note is about something sensitive, following the human handoff guide.

Start with ready-made templates

If you'd rather skip the setup, download the free WhatsApp agent or check out the AgentKiosk pack with 8 agents ready to import into n8n.