Company
Date Published
Author
Samuel Eddy
Word count
1659
Language
English
Hacker News points
None

Summary

You can forward voicemail recordings to email using Twilio Studio, Functions, and SendGrid by creating a function that initializes a SendGrid mail client and uses it to send an email with the recording URL. To set up this functionality, you need to create a Twilio account, a verified sender email address in SendGrid, and a SendGrid API key. You also need to configure your Twilio Function to securely store these values as environment variables. The function will then build an SG mail request using the API Secret, define message parameters including the recording URL, and send the request to SendGrid for delivery. Additionally, you can set up a Studio Flow with a Say/Play widget to record voicemails and a Record Voicemail widget to play back the recording, as well as a Run Function widget to call your function. Finally, you need to configure your Twilio number's Incoming Call webhook to use the Studio Flow.