Article #5: Send SMS from Power Automate with Azure Communication Services (Public Preview in Canada)

Overview

My customers always express requirements about notifications. I will dedicate later a blog for the several ways provided by Power Platform to run notifications.

In this blog i will focus on how a configurator can create and consume a serivce very easy to configure in order to send SMS with Azure Communication Services.

Azure Communication Services Setup

Lets start configuring the Communication Services resource in Azure.

Click on + Create a resource.

Search for Communication Services on the lookup field.

Click on Create.

Continue with the wizard by linking your resource to a subscription (it has to be a paid subscription otherwise you will not be elligible to get a phone number, trial and free credit subscriptions like MSDN are not supported for this service) to track the cost of service consumption, a resource group (if you dont have any you can create a new one).

The provisioning of the service may take couple of minutes. When completed, click on Go to the resource.

The next step will be to configure the phone number that will be used to send SMS.

Click on # Phone Numbers blade, then click on +Get.

If you see Get button disabled, it means that your subscription is not supporting this service and you need to switch to different paid subscription like Pay As You Go.

A wizard will open asking you what region you want to use, (for my case i use Canada since its where i am based, notice that at the moment i am writing this blog only US and Puerto Rico regions are in General Availability, two other regions are in public preview: Canada and United Kingdom).

Select An application will be making calls or sending SMS messages in the Use Case options.

Select the Toll-Free as the number type.

in the SMS section, select Send SMS.

Click on Next: Numbers

In this section, you will be asked how many phone numbers you want to order and which prefix to use. For this blog i will go with the first option 844 and select 1 in the quantity field.

Click on Search.

Azure will lookup a free number to use, you can select and click on Next: Summary.

Click on Place Order button.

You Azure setup is now completed.

Flow Configuration

Now you can create a Power Automate flow, depending on your context, feel free to choose the proper trigger you need. For this blog i will go with instant Flow trigger.

Add a new Step and search for Azure Communication Services SMS.

Make sure that you are selecting Azure Communication Services SMS by highlighiting the option and checking the tooltip, as you can see in the following screenshot there are various actions related to Azure Communication Services.

Select Connection String Authentication as Authentication Type. You need to get the value now from Azure.

Go back to your Azure Communication Services provisioned earlier, click on Keys.

Copy the Connection String value and past it in the connection flow action, Click on Create.

In from Phone Number field, select the phone number you previsouly ordered from Azure portal.

In the Recipients To -1 field, put the receipient’s phone number (in a real life scenario, it can be the phone number of a contact in Dataverse for example).

Feel free to add other recipients in CC by clicking on + Add new item.

The Phone Numbers needs to be in the E.164 format. In other words it has to be something like +1XXXXXXXXXX without spaces.

Write a message in the message text box.

You are all set, now you can trigger your flow and receive the SMS message. Click on Test, Manually , Run flow

There you go, your SMS should be sent to it destination.

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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