WhatsApp Triggers¶
Currently, Connect iPaaS provides only the real-time webhook trigger as described in the trigger page for Connect iPaaS. Setting up the trigger is a very simple process as shown in the example below:
Once you select the WhatsApp application from the dashboard, you have the following choices of trigger types for your flow.
- New WhatsApp Message Received
New WhatsApp Message Received¶
For the New WhatsApp Message Received
trigger, whenever a new message has been sent to a WhatsApp number, this flow will receive a trigger event. As shown in Figure 1.
Connect to Twilio¶
After selecting the trigger type, as shown above, Connect iPaaS will make a connection to Twilio to use WhatsApp API.
Note: As mentioned in the Overview, due to current API limitations on the WhatsApp platform, you will need to go through Twilio to be able to use WhatsApp in your flows.
Once you have made a connection to Twilio as shown in the connection guide, you will need to set up the trigger in Twilio.
Set up the Trigger for your Workflow¶
In these steps, we will set up a WhatsApp trigger that will listen for messages sent to a WhatsApp number.
To WhatsApp Number¶
This phone number is your WhatsApp Number it is assumed that this WhatsApp number is from one of the following places:
- Twilio WhatsApp Sandbox number. To try out the Twilio WhatsApp sandbox, the section below will show you how to get this number.
- Your own Twilio Number has WhatsApp enabled. To enable WhatsApp on your Twilio Number you will have to follow Twilio's how-to-guide.
The following are the steps to get the Twilio WhatsApp sandbox number:
- Login to your Twilio Account.
- Go to Twilio WhatsApp Dashboard.
- Click on the
Triple dot
icon at the extreme left and selectProgrammable SMS
. - Go to
Settings
, then chooseWhatsApp Sandbox Settings
. - There you will find your WhatsApp sandbox number.
Endpoint URL¶
Endpoint URL
is the URL that Twilio will forward WhatsApp messages to. The following steps show how you can configure your Twilio sandbox to send messages to Connect iPaaS.
Steps to place the Endpoint URL on your Twilio Sandbox account¶
- Copy the URL that was created by Connect iPaaS platform.
https://trial.robomq.io/webhooks/<your company tenant>/admin/Whatsapp/message/new
- Login to your Twilio Account.
- Go to Twilio WhatsApp Dashboard.
- Click on the
Triple dot
icon at extreme left and selectProgrammable SMS
. - Go to
Settings
, then chooseWhatsApp Sandbox Settings
. - There you will find the endpoint URL configuration. .
- Paste the copied webhook URL from Step 1 in the
WHEN A MESSAGE COMES IN
field under Sandbox Configuration. - Click the blue
Save
button at the bottom of the page to save these settings.
Note: If you would like to know about the sandbox setup, please refer to the how-to-guide. Or if you have a verified production account, set up a call with us.