Twilio SMS: Get Started

Let’s get you started using Twilio to send SMS to your customers as part of your triggered campaigns!

Getting started with Twilio

You’ll need a couple of things before you can enable Twilio in

  1. A Twilio account: If you don’t have one, you can sign up on We recommend using a trial account to get started.

  2. A Twilio-specific phone number, shortcode or an alphanumeric id: You can’t use your own phone number to send SMS; you need to purchase a number from Twilio. You can do so from your account page. If you already have a Twilio-specific number, make sure to have it at hand when you’re composing your message later.

    Similarly, if you’re in the US, Canada, or the UK, you can use a short code: a 5- or 6-digit number that can send and receive SMS/MMS. They need to be leased, and Twilio can do so for you; you can read more on Twilio’s documentation page.

    Alternatively, if you have a paid Twilio account with Alphanumeric Sending enabled, you can send using an Alphanumeric ID in instead of a Twilio phone number.

  3. An Account SID and Auth Token: You can see these on your Twilio dashboard:

Twilio credentials
Twilio credentials

Note: You might also see a set of test credentials for Twilio in your account page. To send SMS with, you’ll need to use the Live credentials, not Test.

Configure your user data in

To make sure that you can reach your customers via SMS, you’ll need to make sure that you have the right data in

Most importantly, you will need to store a phone number for customers (for example, an attribute called phone). Ideally, this number will be formatted in E.164 format. This is very important. If it’s not used, the likelihood that your message will be sent is lower, because Twilio has to try and detect the number format, and that detection may not always be successful.

What is E.164 format?

E.164 is the internationally-standardized format for all phone numbers. If your number is in this format, you can be that much more certain that it will reach your end user. E.164 numbers can have a maximum of fifteen digits and are usually written as follows:

[+][country code][subscriber number including area code]

Here are a few examples:

USA415 555 2671+14155552671
UK020 7183 8750+442071838750
China021 6309 5246+862163095246
Australia(08) 9287 8230+61892878230

More specific information about E.164 (and other phone formats) on Twilio’s support site.

Enabling Twilio in

From your workspace dashboard, head to Workspace Settings in the left-hand menu and then click ‘Get Started’ next to Twilio:


What you’ll need is your Account SID and Authorization Token — as we mentioned, you can get these on your account page in Twilio. Copy and paste them into the fields in, and click Test and Save:


Syncing Phone Numbers and Message Services

Once you successfully enable Twilio, you’ll see your synced phone numbers, short codes, and messages services below your credentials. If you add or change any of these sender identities in your Twilio account, you’ll need to re-sync them here before using them in your messages.

Using a Manual Sender ID

You’ll also see Manual Sender IDs in your Twilio Settings. In this section you can add an Alphanumeric Sender ID, a Message Service ID, or provide some Liquid that dynamically determines the Sender ID for each message.


Adding an Alphanumeric ID

Adding one of these is simple: tell us the ID you want to use, and choose a name (how you refer to it internally; your customers won’t see this) and save. You can use both upper- and lower-case ASCII letters, the digits 0 through 9, and space. It can’t be only numbers.

  1. Enable the feature in Twilio first! You can add these in, but if you haven’t enabled it in your Twilio project settings, the message will fail.
  2. They’re one-way: Your customers cannot reply to them.
  3. Opt-in/opt-out: Customers receiving these should have opted in to your service and be informed on how to opt out.
  4. They’re not supported in all countries, including the USA: If you try to send to an unsupported country from an Alphanumeric Sender ID, your SMS will fail to send. Note that some require sender ID pre-registration with Twilio.

If you need it, Twilio have documentation on how to activate this feature.

Using Liquid to determine your Sender ID

You may want to dynamically select between multiple Sender IDs at the time each message is sent. Liquid code can be added as a Manual Sender ID to accomplish this. For example, if you wanted to send from a different phone number depending on which Customer Success Manager is assigned to the customer, you could insert a code block such as:

{% if customer.CSM == "stephen" %}
{% else if customer.CSM == "zack" %}
{% else %}
{% endif %}

Adding Twilio messages to your campaign

Once you have Twilio enabled, you can start sending SMS messages! First, create a campaign in that will trigger sending an SMS.

Add your Twilio action to the workflow

Next, add your Twilio SMS to the campaign by dragging and dropping a ‘Twilio SMS’ item into the workflow builder.

Give it a name which makes sense to you— your end-user won’t see this.

If you want to add an A/B test, now's the time! Click the **Turn into A/B test** button, or see more detailed instructions here!

Next, click Add Content to open the SMS composer and set up your message.


Compose your Twilio SMS

Finally, it’s time to write your SMS. In the composer, it consists of three parts:

  1. The “From” field: The number, shortcode, or Alphanumeric ID you’re using to send the message
  2. The “To” number: The number that the message is headed to; your user’s number
  3. The message body: This is where your message’s content goes.

Note: You can use Liquid here to send to your customer’s phone number, or to address them personally, if you’d like. Just make sure you have the right attributes for that user. You can see this in action in our example below, or click here to learn more about Liquid in


If you use Alphanumeric ID here, remember that you must have the feature enabled in your Twilio settings, and users cannot reply to it: it’s one-way only!

Send a test message

To make sure your SMS works, you can send a test message clicking Send test… in the top right-hand corner of the composer. You’ll see a modal, into which you can enter a phone number to which you can send your message.



The SMS should then appear on your phone (or whichever number you chose to send it to)! We have a separate guide for tracking your sent Twilio messages.

Need a hand?

If you have questions, feel free to have a look at the FAQ, or let us know! We’re happy to help.

Copied to clipboard!