Using Flic buttons with Power Automate and Twilio SMS & Voice

In 2019, I worked on an in-house project to create buttons that would be able to notify a group of people through their preferred methods instantaneously - SMS, voice call and then finally, a Teams message. I had been exploring using Flic buttons as help call buttons for conference rooms and this seemed like a good extension of that testing.

Flic buttons are easy to register. You'll need to create an account which the buttons will be registered and then you'll use your cell phone to name the button for use in Power Automate. Once the button has been named, you need to assign the Flow action to each of the three button actions (single press, long press, double press). Flic already has a Power Automate trigger and an SMS action, so will not need to create a custom connector for those.

In Twilio, you will need to preload the account with $20 or more. Then you can buy a phone number to use as the sender of these texts and calls. I considered updating this action to use Azure Communication Services, but both services cost about the same, and the department who was going to be paying for the service was happy prepaying Twilio rather than going to a postpaid Azure consumption.

The Twilio call is made by making a POST to the API using Basic authentication. You'll need to use your Account SID and an authentication token. The POST will look like:

https://api.twilio.com/2010-04-01/Accounts/{AccountSID}/Calls.json

And then the Header will need to have:

Content-Type application/x-www-form-urlencoded

For the body, you'll need to include the 10-digit numbers for To and From, and add a URL of the XML file that includes the text to be said. Notice the hex value for special characters:

To=%2B18145551234&From=%2B18145559876&Url=http%3A%2F%2Fraw.githubusercontent.com%2Ftroystaylor%2Ffolder%2Ffile.xml