In this guide we will cover how to integrate Twilio SMS API into Picky Assist platform using Connector
Prerequisite
- Picky Assist Account enabled with Connector
- Twillio Account with SMS service enabled and Credit to Send SMS
About Twillio
Twillio is a cloud communication platform which offers wide range of Telecommunication services like SMS, Voice , SIP Calling etc for developers and system integrators. If you don’t have an account with Twillo then please Click Here to Create A Free account and get $10 for testing the SMS Services offered by them.
Possibilities
The possibilities with this integration is to send SMS from Picky Assist Connector in case if a mobile number is not a WhatsApp Number, for an example if you are sending an order alert via WhatsApp and want to deliver the same via SMS only if the mobile number is not a WhatsApp number then we can use the Twillio SMS API to achieve this.
How it Works
We make use of Twillio SMS API to send messages and Connector HTTP Request module to trigger the Twillio SMS API i.e whenever you want to send an SMS from the Connector just trigger the Twillio SMS API.
Getting the SID & Auth Token
We need to get the Twillio SID & Auth Token for the project you have in Twillio in order get start the integration
Login into the Twillio Account and from the Dashboard find the SID & Auth Token of the project as shown below;
Integrating with Connector
Now we need to make use of “HTTP Request” action in the Connector to Trigger the Twillio SMS API, Click the Action and search for HTTP Request then Click on “Configure” as shown below
A popup will open as shown below, you can give a name to the Request then you need to copy the below URL and paste in the URL as shown in the below image
https://api.twilio.com/2010-04-01/Accounts/copy-paste-SID-here/Messages.json
You need to put the SID in the place marked as bold then copy and paste the same in the popup as shown below;
Now click on the “Authorisation Tab” and Select Authorisation Type as “Basic Auth” in the Username you have to put the Twillio SID and Password you have to put the “Auth Token” as shown below
After completion of the above steps now Click on the next Tab named “Body” then select Body Type “Query String/Form Data” and input data as show below in the left side of the section and in the right side of the section you need to put details
From : From which the messages should be sent, this need to be used as approved by Twillio
To : To which number the SMS should be sent, the number should be with country code, you can select the number dynamically using the Attribute button
Body : This is where you input the body of the message you want to send, you can customise the message with the values using the attribute selection
Now Click on Save HTTP to Complete the Integration. Just make sure the Action is enabled before testing the same.
Testing the Connection
You can simply trigger the Event or Use Simulate Test mode in the Connector to test the HTTP Request Action, if you have received the SMS then everything is working as it should be, in case if you have not received the SMS then click on Logs and check status of the request.
Pro Tips
You can save SID & Auth Token in the Data Storage module of the Connector to reuse the same in another Actions or Connectors which helps you to save time in case you have changed the Auth Token
In order to send SMS only if the mobile number is not a WhatsApp number then you need to make use of Filter, make sure you have added filter for all the Steps which are related to Sending SMS or WhatsApp.
Add comment