Issue
When using Twilio Studio and Functions to send voicemail recordings via email, you may expect the email to include a transcription of the voicemail. However, some users encounter an issue where the email does not have the transcription. This article explains why this happens and how to resolve it.
Product
Twilio Studio/Functions
Cause
This issue typically occurs when the Twilio Function responsible for sending the email is triggered immediately after the voicemail recording is completed, but before the transcription process is finished. As a result, the transcription text is not yet available to be included in the email.
Resolution
To ensure that the transcription is included in your email notifications, you need to configure your Studio Flow so that your Function is triggered only after the transcription is complete.
Steps to Fix
-
Open Your Studio Flow
Go to the Studio Flow where you handle voicemail recordings (e.g., “After-Hours Missed Call”). -
Locate the Record Voicemail Widget
Find the widget that records the voicemail. - Set the Transcription Callback URL
- In the widget’s configuration, look for the Transcription Callback URL field.
- Enter the URL of your Twilio Function that sends the voicemail email (e.g., https://your-function-domain.twil.io/send_voicemail_email).
-
Remove the Run Function Widget
Remove any Run Function Widget(ex. EmailVoice) that sends the email immediately after recording. Keeping this widget will result in duplicate emails: one without the transcription (sent immediately), and another with the transcription (sent after the callback). -
Save and Publish
Save your changes and publish the updated Studio Flow. -
Test the Flow
Call your number, leave a voicemail, and verify that the email now includes the transcription text.
By setting the Transcription Callback URL, you instruct Twilio to call your Function only after the transcription is ready. This ensures that the transcription text is available as a parameter in your Function, so it can be included in the email.
Additional Information
If your voicemail emails are missing transcriptions, make sure your Function is set as the Transcription Callback in the Record Voicemail widget. This change ensures your emails will include the transcription once it’s available.
More details can be found in the following documents:
- Twilio Studio Record Voicemail Widget Documentation
- Forward Voicemail Recordings to Email with Studio, Functions, and SendGrid (Twilio Blog)