Twilio SMS Inbound

<< Click to Display Table of Contents >>

Navigation:  Message Retrieval Accounts > Reading/Receiving Messages >

Twilio SMS Inbound

Twilio is a cloud communications platform. It enables developers to programmatically make phone calls and to send & receive text messages using its web service API's. When used with ThinkAutomation it enables ThinkAutomation to receive & send SMS text messages and to make outgoing telephone calls which can be used to read text to the receiver and/or connect a call to another phone number. Twilio is a worldwide platform and the cost is based on usage.


ThinkAutomation can receive SMS text messages sent from any mobile phone to any of your Twilio phone numbers. ThinkAutomation can also send outgoing SMS text messages via Twilio and make outgoing calls.


You need to enter your Twilio Account SID & Token if you will be using the Twilio Send SMS, Twilio Wait For SMS Reply or Twilio Make Call actions in any Triggers for this account.  You only need to enable the Receive Messages From Twilio option if you will also be receiving incoming SMS messages from Twilio for this ThinkAutomation account.








You need to create a Twilio Account if you want to be able to process received SMS text messages using ThinkAutomation or if you want ThinkAutomation to make outgoing calls or send SMS messages via Twilio.


Once you have created a Twilio Account, login to Twilio and select Show API Credentials from your Dashboard. Your Account SID and Auth Token will be shown. Enter these into the Twilio Account SID and Twilio Auth Token entries. Click the Verify Twilio Account button to test these credentials.


If you want to process received SMS text messages enable the Receive Messages From Twilio option.


You then need to create a Twilio Phone number and assign the Twilio Messaging Request URL shown in the ThinkAutomation Account to the Twilio phone numbers that you want to receive text messages from:




Once assigned then any text messages sent to the Twilio number will be sent to ThinkAutomation for processing. You can create different ThinkAutomation Accounts and assign the URL to each Twilio Phone number, or you can use a single ThinkAutomation Account and assign the URL to all of your Twilio Phone Numbers and then parse the 'To' number out of the received message.


When a text message is received ThinkAutomation will create a new message that can be processed by your Triggers. The message will be in the format:


FROM: {phonenumber]

BODY: {messagetext}


TOCOUNTRY: {countrycode}

TOSTATE: {city}

SMSMESSAGESID: {smsmessagesid}


SMSSID: {smssid}

SMSSTATUS: {status}

FROMCOUNTRY: {countrycode}

TO: {twilionumber}


MESSAGESID: {messagesid}

ACCOUNTSID: {accountsid}

HTTP_USER_AGENT: TwilioProxy/1.1

HTTP_X_TWILIO_SIGNATURE: {twiliosignature}


You can then parse this message and perform Trigger actions, such as sending an outgoing SMS or recording the message details in a database.


Twilio integration requires that the ThinkAutomation Web Services to be configured and accessible externally. This is because Twilio makes web callbacks to ThinkAutomation. Parker Software can assist in configuring your ThinkAutomation setup & Twilio account. Please contact our professional services team for more information. See: The ThinkAutomation Web Services


ThinkAutomation © Parker Software 2016