Twilio Destination
UpdatedAbout this integration
Twilio is a developer platform for communications, helping you add capabilities like voice, video, and messaging to your applications. As a destination, you can identify profiles and send events to Twilio that you can use to trigger messages, so you can respond to your audience with prompt, personalized messages.
This destination sends SMS through the Twilio Programmable Messaging API. If you want to trigger multi-step communication workflows in Twilio, use the Twilio Studio destination instead.
Use cases
- Send transactional SMS notifications—like order confirmations, appointment reminders, or shipping updates—triggered by track events from your source.
- Alert customers about account activity, such as password resets, login attempts, or billing changes.
- Re-engage inactive users by sending a personalized text message when someone hasn’t visited your app in a set period.
- Deliver time-sensitive information like one-time passwords, verification codes, or flash sale announcements.
Getting started
Go to Data & Integrations > Integrations and select the Twilio entry in the Directory tab.
(Optional) Select the data sources that you want to connect to your outbound integration. You can always connect data sources later. We’ll only show you data sources that work with your integration.
Configure your integration.
Account Id: Your Twilio Account Id
Token: Your Twilio Token.
Phone Number: Your Twilio Phone Number with Country Code.
Click Enable Destination.
Actions
When you’re done setting things up, you can go to the Actions tab to see how we map incoming data to your integration.
You may need to add actions for this integration
While we often have default triggers for actions, we don't always add those actions as defaults. You may need to add actions to make sure that you're sending all the data that you want to send to your integration. See our actions page for help setting up actions.
| Action | Default Trigger | Description |
|---|---|---|
| Send SMS |
| Sends an SMS message |
Send SMS
The Send SMS action sends a text message to a phone number through Twilio’s API. Here’s what you need to know about the key fields:
- To: The recipient’s phone number. Use E.164 format—for example,
+15551234567. Map this to a trait or property containing your customer’s phone number, like$.traits.phoneor$.properties.phone. - Body: The message content. You can use variables to personalize the message, like
Hi {{$.traits.first_name}}, your order has shipped! - Media URL: (Optional) A URL pointing to media you want to attach as an MMS message. The recipient’s carrier must support MMS.
Example: order confirmation
If your source sends a track call when an order is placed, you could set up the trigger for the event Order Completed and configure the action like this:
| Field | Value |
|---|---|
| To | $.properties.phone |
| Body | Your order #{{$.properties.order_id}} has been confirmed! Estimated delivery: {{$.properties.delivery_date}} |
Things to know
- Phone numbers must use E.164 format. They start with
+followed by the country code and number—for example,+15551234567. If your phone numbers aren’t in this format, transform them before they reach Twilio. - You need a Twilio phone number. You can’t send SMS from an arbitrary number. Purchase a phone number in your Twilio Console or use a Twilio Messaging Service.
- Standard Twilio rates apply. Each SMS sent through this integration counts toward your Twilio usage and billing. Check Twilio’s pricing for details.
- MMS support depends on the carrier. If you include a Media URL, the message sends as MMS. Not all carriers or regions support MMS—in those cases, the media attachment may not arrive.
