Integrate Twilio with D365 CRM(CE) to send Text Messages.

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.

Pre Requisites

  • 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

Steps:

  1. Sign in to your Twilio account (https://www.twilio.com/console)
  2. Click on Dashboards
  3. 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) 
  1. 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):

  1. 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.
  1. Search for Twilio connector and select “Send Text Message” action.
  1. Give name to your connection and enter Twilio Account Id which is Account SID and Twilio Access Token which is Auth Token.
  1. 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.

Entire Flow:

Testing the Flow:

Leave a Reply

Your email address will not be published. Required fields are marked *