In this blog article we will see how we can send an SMS from the Dynamics CRM using the Power Automate and Twilio. Twilio is a third-party platform which has the capability to send / receive SMS, make calls, etc.
Let’s have a quick look at the steps involved in sending an SMS from the Dynamics CRM using Power Automate & Twilio.
Let’s take a scenario where an Applicant applies for a Program in CRM, then CRM application sends an SMS to the Applicant saying that you have “Successfully applied for a Program”.
Setup and configure Twilio
- Create a Twilio trial account in case if you don’t have a Twilio subscription.
- Create a trial phone number. This phone number we will use to send an SMS.
- Once we are done with the above two steps, we will get Account ID, Auth Token and Phone Number (refer Fig. 1). We will use these three parameters to configure the Power Automate to send an SMS.
Configure Power Automate
- Navigate to Power Automate.
- Click on “My Flow” -> “Automate – From Blank” to create an Automate Flow from the scratch (refer Fig. 2).
- Specify the Name of the flow and the trigger option. In this case we are using Dynamics 365 and it will trigger when a new record is created (refer Fig. 3).
- Specify the Dynamics 365 Organization Name and Name of the entity (refer Fig. 4).
- Choose an action. In this case we are using “Twilio” for sending an SMS whenever a new record is created (refer Fig. 5).
- Specify the Connection Name, Account ID, Auth Token and click on Update (refer Fig. 6).
- Configure the SMS parameters like “From Phone Number”, “To Phone Number” and “SMS Text” (refer Fig. 7).
- From Phone Number: Select from the Twilio phone number which we have created in the above section “Setup and configure Twilio”.
- To Phone Number: This we’ll be mapped to the Applicant’s mobile number.
- Text: This is where we have to mention actual message.
- Navigate to your Dynamics CRM organization.
- Perform the action to trigger the Flow. In my case, we’ll create an applicant record in CRM (refer Fig. 8).
- We are all set to send an SMS from the Dynamics CRM using Power Automate and Twilio.
- Here is the screen capture of SMS which I received (refer Fig. 9).