Introduction: Messages can be sent from a D365 CRM to an individual using Twilio. In this blog, we will see how we can send Messages from the D365 CRM using Twilio. We will be using Microsoft flows to achieve this.
Use Case: Send SMS to Customer whenever case notes are added.
- Twilio Account
- D365 CRM(CE)
- Power Automate(MS Flow)
Connecting with Twilio:
To connect Twilio in Microsoft Flow you require:
- Twilio Account Id
- Twilio Access Token
- Sign in to your Twilio account (https://www.twilio.com/console)
- Click on Dashboards
- Under the Project info tab, you can find the Account SID and Auth Token (Copy this value and paste it somewhere. You will require these values in MS Flows)
- Setup Phone Number.
- Click on “All Products & services”
- Click on # Phone Numbers
- Click on “Getting Started” and click on “Get your first Twilio phone number”
- Click on Choose this number
- Click on Done
Twilio Documentation for more details: https://www.twilio.com/docs/usage/tutorials/how-to-use-your-free-trial-account
Creating Power Automate(MS Flow):
- The trigger for my flow is “When a record is created, updated or deleted” in CDS (select a trigger based on your requirement). Whenever notes are added to the case, it will get triggered.
- Search for Twilio connector and select “Send Text Message” action.
- Give name to your connection and enter Twilio Account Id which is Account SID and Twilio Access Token which is Auth Token.
- Enter Details in Action.
- Select the “From Phone Number” from the dropdown
- Enter the Customer Phone Number in “To Phone Number”
- Enter Message in the Text option.
Testing the Flow: