The necessity to handle Twilio SMSs to Power Automate is high. Companies working with SMSs to communicate with their client are able to do so using Dynamics 365 Marketing. However, this communication is one way. This post will explain how we can collect and respond to incoming messaging whenever it happens to make the communication two way.
Disclaimer, This post is not sponsored and is based on personal opinion.
Check the link for more information about receiving and replying to SMS and MMS messages.
Twilio connector for Power Automate
It is essential to mention that there is a Twilio connector for Power Automate. However, this connector has no trigger and cant be used as a listener when a text comes in. Therefore, the connector is not the subject of this post.
Although we will not be discussing the connector, you can find information about the connector in this link.
Twilio SMSs to Power Automate
Twilio offers the means to connect incoming messages with other systems. We will be using webhooks to integrate the incoming Twilio SMSs to Power Automate.
Twilio settings
In the first step, we need to locate the number we want to be using from the Twilio account and under the active account, as shown below.
Select the number that you want to configure, and scroll down to the “Messing services” on the phone page, as shown below.
Select webhook, and you will see the demo link that we will want to replace with Power Automate URL; we will be generating the following steps.
Power Automate flow creation and configuration.
We will create a new automated Power Automate from Power Automate with a “When an HTTP request is received” trigger, as shown below. Use HTTP in the search and select the HTTP request trigger.
After the trigger, add the Parse JSON action. In the content, use the following code.
@{triggerBody()?['$formdata']}
In the schema, add the following code.
{
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"key",
"value"
]
}
}
Now, save the flow, and the link show is generated. Please copy the link below.
Finally past the URL in the Twilio incoming messages, as shown below.
In the following post, we will be discussing how to manage Twilio SMSs to Power Automate, for example, managing subscriptions. We will discuss the SMS parameters passed over from the Twilio webhook to the newly created Power Automate in this post.