> For the complete documentation index, see [llms.txt](https://docs.getmesa.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.getmesa.com/connect/twilio.md).

# Twilio

The [SMS](https://docs.getmesa.com/tools/sms.md) tool is a great way to quickly send SMS messages. However, if you need to send international messages or send a high volume of messages, we recommend using the Twilio app to send messages from a dedicated phone number you control. Twilio charges a monthly fee to purchase the phone number (typically $1 per month) and a [per-SMS fee](https://www.twilio.com/sms/pricing/) (typically around a cent per message).

* [Connect Twilio with MESA](#connect)
* [Configuration](#configuring)

## Connection <a href="#connect" id="connect"></a>

Before you get started, you will need to [create a Twilio account](https://www.twilio.com/try-twilio), add your billing information, and [purchase a phone number](https://support.twilio.com/hc/en-us/articles/223135247-How-to-Search-for-and-Buy-a-Twilio-Phone-Number-from-Console) in the Twilio console.

When you're setting up your first workflow with Twilio, you'll need to add your **Key** and **Secret** so that Twilio is a connected app within MESA.

<figure><img src="https://3425906282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1H6u1HQc3Iew7ATmmiCi%2Fuploads%2Fgit-blob-91033a2ebd07801a9968460da517ffde28b97422%2Fimage%20(470).png?alt=media" alt="Screenshot of the Twilio step in a MESA workflow prompting for the Key and Secret. Spotlight the Key and Secret fields."><figcaption></figcaption></figure>

You can [click here to locate your Account SID and Auth Token](https://www.twilio.com/console/project/settings). Within the Twilio Settings, click on the Keys & Connections: API keys & tokens section.

![Screenshot of the Twilio console Settings page. Spotlight the Keys and Connections API keys and tokens section.](https://3425906282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1H6u1HQc3Iew7ATmmiCi%2Fuploads%2Fgit-blob-0c4b0ed3ab5ed815526f42d0aa689f8598ed3df9%2FAS-TWILIO-API.png?alt=media)

In the **Live Connections** section:

* Copy the Account SID and paste that as the Key within MESA.
* Copy the Auth Token and paste that as the Secret within MESA.

<figure><img src="https://3425906282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1H6u1HQc3Iew7ATmmiCi%2Fuploads%2Fgit-blob-ecaf2d85606697ec3ce3e22ad821ce5b3f22861b%2FAS-TWILIO-AUTH.png?alt=media" alt="Screenshot of the Twilio console Live Connections section showing the Account SID and Auth Token. Spotlight the Account SID and Auth Token values."><figcaption></figcaption></figure>

Then, click on Add Connection.

### Configure <a href="#configuring" id="configuring"></a>

In order to send a SMS, you will need to add a phone number into the From phone number field. Make sure that the phone number that you enter **does not** contain dashes or parenthesis but **do** contain a country code. An example: +15017122661

In the To phone number field, you can [utilize variables](https://docs.getmesa.com/workflow-builder/fields/variables.md) to make the SMS action specific to your needs. The screenshot below is from the [Send an SMS via Twilio to your customers when their order arrives template](https://www.getmesa.com/connect/tracktor/integrate/twilio/send-a-twilio-sms-to-your-customer-when-their-order-arrives).

![Screenshot of the Twilio SMS action in a MESA workflow with the From and To phone number fields configured using variables. Spotlight the To phone number field.](https://3425906282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1H6u1HQc3Iew7ATmmiCi%2Fuploads%2Fgit-blob-28f1fe0a47c937ede9c22a2ac72e0f0f4c01de24%2FAS-TWILIO-CONFIGURE.png?alt=media)
