My first app with IoT-devices and Power Automate
Connect your IoT-buttons (and Qods) with any third party system that has a connector to Microsoft Power Automate, without writing a single line of code.
For instance, you can:
- Log your service requests into Microsoft Excel to track them efficiently
- Send an SMS or an email when a key is pressed
- Create a customer satisfaction dashboard in Microsoft Power BI
Before you start: requirements
Before using this connector, you need to:
- Create a free Ubiqod account
- Validate your email and connect to your Ubiqod account
- Have a valid Microsoft Power Automate licence (visit https://flow.microsoft.com/fr-fr/)
If you don’t see any IoT-device in your Ubiqod account, please contact our support team (email@example.com).
Prepare your Ubiqod Account
When you create your Ubiqod account, a demo IoT-device is automatically included (its name starts by SIMUxxxx and cannot be modified). This IoT-device is ready to use. You will be able to test your Power Automate flow without having a physical device in hands, thanks to our integrated simulator.
If you need to configure your environment again, you must complete the following steps in your Ubiqod account:
- Create a Site
- Create an Action list (in the Settings menu). You can leave it blank (default labels will be generated like “button 1”) or add labels for each button to make it more explicit.
Edit your IoT-device under the “Trackers” menu and fill in the following fields:
- IoT-device label (can be a position inside a building)
- Dispatch group(s) (you must include the IoT-devices that you intend to connect with Microsoft Power Automate to at least one Ubiqod dispatch group).
- Code list
- Do not force code mode
Create your Flow
About Microsoft Power Automate
Microsoft Power Automate is a low code platform designed to help users that are not coders to connect different apps between them. With Microsoft Power Automate, you can create a Flow that can send a SMS when a new line is added in a spreadsheet, without writing a single line of code.
A Flow contains at minimum:
- A trigger
- An action
You can add multiple actions and/or conditions in a Flow.
Our Ubiqod connector for Microsoft Power Automate lets you trigger an action each time data is received from one or more IoT-devices or Qods.
Add a Flow
In Microsoft Power Automate, in “My flows” menu, click “New”, and choose “Automated from blank”, or choose “Automated flow” in the “Create” menu:
Enter a flow name.
In the field “Choose your flow’s trigger”, look for “Ubiqod”, and choose “When data is received from devices”:
The first time you setup the connector, Microsoft Power Automate will ask you for a connection name and an API Key.
The API key can be found in the “Account” menu of your Ubiqod account:
Click on the Show/Hide icon, copy the API key, and paste it into the Microsoft Power Automate screen. Give a name to the connection, and click “Create”:
Configure the trigger
In the Group Name list, select a Dispatch group:
Each IoT-device belonging to this group in your Ubiqod account will trigger an action in your Flow.
Congratulations builder! Your trigger is configured. You can now add a New Step by clicking the corresponding button, and setup action.
Use the data in the action step
At next step, you will tell Microsoft Power Automate how to use data of your devices to perform an action.
As an example, we will create an action that sends an email with the details of a service request, depending on the button pressed on an IoT-device.
Look for the “Mail” connector in the list of actions, and choose “Send an email notification” in the action list:
You may be asked to validate the Terms and Conditions of Use.
For each field of the mail action setup, you can use the data from the device. For instance, if you want to set the subject of the email as Device XXX has a message”, where XXX is the name of the IoT-device, you will configure the subject this way:
You can mix dynamic fields (available on the right of your screen, in “Dynamic content” tab) and text. You can even use formulas (Expression tab) to build a more customized experience.
Here is the list of fields available for mapping!
Complete mandatory fields to customize your service request (To, Body and Subject) and click “Save”.
Congratulations! You have built a full functional IoT App with Ubiqod and Microsoft Power Automate.
Now, each time you press a button, an email will be sent.
Your account is configured with sample data. If you want to change the label corresponding to a button of your IoT-device, you must edit the Code list associated to your IoT-device.
Tests & troubleshooting
You can launch the simulator to test your flow (click on the "play" icon in the IoT-device list):
Data will be sent 10 seconds after the first press, except if you use the badge. Keep the simulator open until the 3 leds stay up for 1 second.
You can check if Microsoft Power Automate receives data here:
With "real" IoT-device, it can take up to 30 seconds before the email is sent, and sometimes more for it to be received.
Don’t forget to add your devices in the correct Dispatch group in your Ubiqod account (the one used in the trigger).
If nothing happens after 1 minute, go to the IoT-device list in your Ubiqod account, or press "Refresh" to update "Last seen" information:
- If the “Last seen” field does not update: your device does not send the data to the system: contact our support team (firstname.lastname@example.org)
- If the “Last seen” field updates: check if the device belongs to the group set when you configured the trigger into Microsoft Power Automate