Skip to main content

Twilio integrations

Text customers a Simplesat survey from your own Twilio account, triggered by your helpdesk, CRM or any tool that can call a webhook.

You can text a Simplesat survey to your customers through your own Twilio account when something happens in another tool. The integration is called Use a webhook to send an SMS survey, and it's on Simplesat's Twilio page. Each time another tool calls its Webhook URL with a customer's phone number, it sends a text with the survey link, so that tool decides who gets a survey and when. For example, your helpdesk might call it whenever a ticket closes.

Before you start

The Twilio integration is available on every Simplesat plan. To connect Twilio and switch the integration on, you need the Manage integrations permission. Owner and Admin have it by default.

Have these ready:

  • Your Twilio Account SID and Auth Token, from Account Info on the Twilio Console home page.

  • A Twilio phone number that can send text messages.

  • A tool that can call a webhook URL with the customer's phone number at the moment you want the survey to go out.

To see what a connected tool can read and write, read Integration security, permissions and data flow.

Connect Twilio

  1. On the Integrations page, open Twilio.

  2. Click Authenticate.

  3. Enter your Account SID in AccountSID and your Auth Token in AuthToken, then click Authenticate.

  4. When the page shows Authenticated with Twilio, you're connected.

Send surveys by text from Twilio

Twilio doesn't have its own option in the list of places to add a survey, so use Generic Embed.

  1. Create or open the survey and choose External email embed.

  2. Under Choose where to add your survey, choose Generic Embed.

  3. On Publish, click Generate embed code.

  4. Choose Link and click Copy survey.

Twilio sends your message exactly as you type it, so everyone gets the same link and responses don't come with the customer's details. A new Generic Embed survey asks the respondent for their name and email, and they can skip it.

Use a webhook to send an SMS survey

  1. On the Twilio page, click Activate integration on Use a webhook to send an SMS survey.

  2. Copy its Webhook URL. It only shows while the integration is active.

  3. Set up your helpdesk, CRM or other tool to call the Webhook URL when the survey should go out, with the customer's phone number in the data it sends.

  4. The Use data from response list only shows fields we've added for you, and calling the Webhook URL doesn't add them. Send us the names of the fields your tool sends, or an example of the data. We'll add them so you can pick the phone number field.

  5. Once the fields are in the list, fill in these rows in Field mapping and click Save:

Row

What to choose

What to enter

Account SID

Type a value

Your Twilio Account SID

From Number

Type a value

Your Twilio phone number, for example +15555550100

To Number

Use data from response

The field that holds the customer's phone number

Message

Type a value

Your text with the survey link pasted in, for example How did we do? Tell us here: followed by the link

Twilio needs both phone numbers in international format, with a plus sign and then the country code. That means your number in From Number and the customer's number in the data your tool sends.

Use a webhook to send an SMS survey marked Active, with its Webhook URL and copy button below

The Field mapping with Account SID and From Number typed in, To Number set to Use data from response with a phone field, and a Message

Each call to the Webhook URL sends one text, and the integration has no conditions of its own.

The survey text as it arrives on the customer's phone, with the message and the survey link

You can edit Field mapping while the integration is active. For more on how it works, read Writing feedback back, and mapping the fields.

Before you rely on it, send a test text to your own phone. Testing an integration end to end explains how.

Note: If we've changed your Twilio integration for you, it can work differently from what's described here. Contact us to check what yours does.

Change the Twilio account

Reconnect when you move to a different Twilio account, or after you change your Auth Token in Twilio. A changed Auth Token stops your texts, but the page still shows Authenticated with Twilio, so it's easy to miss.

  1. Click Revoke access.

  2. Click Authenticate and enter the new Account SID and Auth Token.

  3. Use a webhook to send an SMS survey switches back on by itself if it was on. Check that it shows Deactivate integration, and click Activate integration if it's still off.

Your Field mapping is kept and the Webhook URL stays the same, so the tool that calls it keeps working. If you've moved to a different Twilio account, also change Account SID and From Number in Field mapping.

Reset integration clears the settings and gives the integration a new Webhook URL, which you then paste into that tool again.

Troubleshooting

My phone number field isn't in the Use data from response list

The list only shows fields we've added for your integration, and sending data to the Webhook URL doesn't add any. Send us the field names your tool sends, or an example of the data. Once we've added them, you can choose the phone number field for To Number.

My customers aren't getting the text

Check each of these:

  • Use a webhook to send an SMS survey shows as active.

  • The tool sending the data calls the integration's current Webhook URL. After Reset integration, the URL is new.

  • To Number uses Use data from response with the phone number field, and the numbers in your data start with a plus sign and the country code.

  • From Number is a phone number in that Twilio account that can send text messages, and Account SID is that account's SID.

  • Message isn't empty.

My responses from the text show as anonymous

The text carries the survey link exactly as you typed it, so it has no customer details. To ask respondents for their name and email, use Show question if customer info isn't already associated with the answer. It's on for new Generic Embed surveys.

My Twilio texts stopped, but the page still says Authenticated with Twilio

Simplesat doesn't check the connection again after you connect. If your Auth Token changes in Twilio, sends fail but the page still shows Authenticated with Twilio. Click Revoke access, then click Authenticate and enter your current Account SID and Auth Token. Use a webhook to send an SMS survey switches back on by itself if it was on. Check that it shows Deactivate integration, and click Activate integration if it's still off. To find out what each error on the page means, read Integration error messages and what they mean.

FAQ

No. Twilio sends the message exactly as you type it, so {{surveyUrl}} would arrive as typed. Paste the survey link itself.

If you want a shorter link, you can use Twilio's link shortening, which works with a Twilio Messaging Service on your own domain once Twilio has set it up. Then, in Field mapping, set Shorten URLs? to true and enter the service's SID in Messaging Service SID. You can also paste in a link you've shortened with another service.

The Field mapping rows Shorten Urls? set to true and Messaging Service SID filled in

Can I text a survey when a case or ticket closes in another tool, like Salesforce?

Yes, if that tool can call a webhook URL when the case or ticket closes. Set it up to call the integration's Webhook URL with the customer's phone number.

Do I need Twilio to send a Simplesat survey by text?

No. Any tool that sends text messages can carry the survey link from Publish. The Twilio integration is for sending the text through your own Twilio account when another tool calls a webhook.

Did this answer your question?