Transcribe and route Twilio voicemails the moment they land
When a voicemail finishes recording in Twilio, an agent transcribes it, decides who should see it, posts a clean summary in Slack, and texts urgent callers back.
Build an agent workflow that turns inbound Twilio voicemails into transcribed, intelligently routed Slack notifications, with an SMS acknowledgement to the caller when the voicemail is urgent.
Trigger: a Twilio webhook fired when a voicemail recording is completed. The incoming payload includes RecordingUrl, From, To, CallSid, and RecordingDuration. Use these directly, do not download the audio yourself.
Step 1, transcribe. Call AssemblyAI Submit Transcript and pass the Twilio RecordingUrl straight through as audio_url. Enable PII redaction so names, phone numbers, emails, and payment details are masked before the agent reads the text. Then call AssemblyAI Get Transcript and poll until status is completed or error. If transcription errors out, post a short failure note to the on-call Slack channel with the caller's From number and stop.
Step 2, understand. Read the transcript and decide two things: intent (one of sales inquiry, support escalation, scheduling, or spam) and urgency (high, normal, or low). Then draft a one-paragraph human summary in plain English that captures what the caller wants and any specific dates, account references, or callback requests. Pull one short verbatim snippet (one or two sentences) that best represents the message.
Step 3, route to Slack. Use Slack Bot Send a Message to post in the channel that matches the intent. Default mapping: sales inquiry to #sales-leads, support escalation to #support-triage, scheduling to #scheduling, and spam to #voicemail-archive (or skip entirely, configurable). If urgency is high, also cross-post to #on-call regardless of category. Format the message as: caller's From number on the first line, then the one-paragraph summary, then a blockquote with the verbatim snippet, and a final line tagging the intent and urgency. Use Slack mrkdwn formatting (single asterisks for bold, angle-bracket links).
Step 4, acknowledge urgent callers. If urgency is high and intent is not spam, use Twilio Send a Message to text the caller's From number a short acknowledgement, something like "Got your voicemail — someone from our team will follow up shortly." Draft the wording fresh each time so it does not feel canned, but keep it under 160 characters and never make commitments about response time beyond "shortly". Skip the SMS entirely for spam, low, and normal urgency.
The agent should make the routing and acknowledgement decisions itself based on the transcript content. The workflow is not a dumb forwarder. Channel mappings, the urgency bar, and the SMS template should all be easy to change at the top of the instructions.
Additional information
What does this prompt do?
- Triggers automatically the second a Twilio voicemail recording is complete, so nothing sits in a forgotten inbox.
- Transcribes the message with sensitive details like names, emails, and card numbers redacted before anyone reads it.
- Classifies each voicemail as a sales inquiry, support escalation, scheduling request, or spam, with a clear urgency level.
- Posts a one-paragraph summary plus a quoted snippet to the right Slack channel, with the caller's number ready to dial back.
- When something is urgent, sends the caller a short text saying a real person will follow up soon, and skips the auto-reply for obvious spam.
What do I need to use this?
- A Twilio account with a phone number that records voicemails
- An AssemblyAI account for transcription with privacy redaction
- A Slack workspace and the channels you want voicemails routed to (for example, a sales channel and an on-call channel)
How can I customize it?
- Change the routing rules, for example send billing voicemails to a finance channel or route after-hours calls to a different team.
- Edit the urgency bar so only specific keywords or phrases trigger the SMS callback acknowledgement.
- Rewrite the SMS template to match your brand voice, or turn off the acknowledgement entirely for certain categories.
Frequently asked questions
Do callers know their voicemail was transcribed?
What stops sensitive information from ending up in Slack?
How does the agent decide what is urgent?
What happens to spam voicemails?
Will this work for voicemails on multiple Twilio numbers?
Stop letting voicemails pile up while customers wait.
Connect Twilio, AssemblyAI, and Slack once, and every voicemail gets transcribed, sorted, and surfaced to the right team in seconds.