SMS Integration with Dynamics 365 + Microsoft Flow + Nexmo

Microsoft Power Platform brings a great set of tools to customize, extend capabilities of most of the favorite apps and create new apps online. Power BI, Power Apps, and Flow are the three pillars of Power Platform.

Microsoft Flow

In the modern world, so many applications from different technologies exist and integrating them was a challenge and now Microsoft Flow can be used to create workflows between different apps.


Nexmo provides various cloud-based APIs such as SMS, Voice, User Authentication, User Identity APIs. Nexmo says SMS API allows you to send and receive text messages to users around the globe through simple RESTful APIs and having following features.

  • Programmatically send and receive a high volume of SMS anywhere in the world.
  • Build apps that scale with the web technologies that you are already using.
  • Send SMS with low latency and high delivery rates.
  • Receive SMS for free using SMS-enabled local numbers in countries around the world.
  • Only pay for the usage.

Most importantly Nexmo provides a connection in Microsoft Flow which makes most of the integration processes easier. Various actions of Nexmo can be triggered through Microsoft Flow.

Nexmo trial account can be created using a valid phone number.


Prices for SMS sending and the other services are available for each country.


Send a Text Message to a Phone Number from Dynamics 365

Following environments and steps needed for sending the text message.

  1. Nexmo for sending text messages using a career/service provider.
  2. Dynamics 365 trial instance, and schema for storing text message data.
  3. Microsoft Flow to connect both Dynamics 365 and Nexmo and design the data flow.
  4. Create the text message in Dynamics 365 and receive the message in the recipient’s phone.

When you get a Dynamics 365 instances, you can use the same credentials to log in to Microsoft Flow as well.

[1] Create a Nexmo account

Nexmo needs an account and it’s very straightforward with a valid phone number. Nexmo account gives API Key and the API Secret which can be used in integration to SMS sending.


[2] Get a Dynamics 365 instance and create the schema for storing text messages.


Creating an entity for storing all the text messages is not mandatory but having a separate entity will be useful in many different ways. Also, I am thinking that the entity is another activity type. The idea is to reuse activity fields and to trigger the Flow when creating the text message record in Dynamics 365.


Enabling “Change Tracking” is important when Dynamics 365 data are dealt with external systems. By selecting, or deselecting, change tracking for specific entities the load on the server resources can be reduced and save processing time when extracting Dynamics 365 data and synchronizing it to an external store.

The following error will be thrown in Microsoft Flow when Change Tracking checkbox is clear and trying to send text messages.

“message”“Entity: cf_textmessage isn’t enabled for change tracking. Please take a look at the link for more details:”,
“errors”: [],
“debugInfo”“clientRequestId: 5d1c1111-72ce-45da-afdf-9a6199710f81″

Text Message looks as follows.

The recipient is the field to store the recipient phone number.

Description field contains the text message.



[3] Setup the Microsoft Flow

Microsoft Flow needs two connectors, Dynamics 365 and Nexmo available in Microsoft Flow.


Following Dynamics 365 connector(or “When a record is created” connector) can be used to connect and trigger Microsoft Flow when Text Message is created.



Create the Nexmo connector with API Key and the API Secret shown in the Nexmo account.25.PNG

Flow looks as follows. To Phone number and the Text have been mapped to Text Message entity fields. Sender Id can be used to show in the recipient’s phone. Nexmo connector here is “Send an SMS”.



[4] Create a text message and receive the message in the recipient’s phone

Following message is created in Dynamics 365.


The text message is received to the given phone number as follows.



Microsoft Flow shows the Run History.


There are some other Microsoft Flow Supported services such as Twilio, Plivo etc… available.

Happy Texting from CRM!




Author: Indika Abayarathne

MSc in IT [University of Colombo] Solutions Architect | Consultant Technologies: Power Platform | Dynamics CE | Azure

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: