Skip to content

Commit 0979f4f

Browse files
authored
Merge pull request #113184 from dominicbetts/central-power-automate
Add IoT Central advanced rules article
2 parents 205f37f + de37407 commit 0979f4f

File tree

5 files changed

+183
-4
lines changed

5 files changed

+183
-4
lines changed

articles/iot-central/core/TOC.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@
8181
href: howto-manage-devices.md
8282
- name: Configure rules
8383
href: howto-configure-rules.md
84+
- name: Use workflows to integrate with other services
85+
href: howto-configure-rules-advanced.md
8486
- name: Analyze your device data
8587
href: howto-create-analytics.md
8688
- name: Add tiles to your dashboard
Lines changed: 180 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,180 @@
1+
---
2+
title: Use workflows to integrate your Azure IoT Central application with other cloud services | Microsoft Docs
3+
description: This how-to article shows you, as a builder, how to configure rules and actions that integrate your IoT Central application with other cloud services. To create an advanced rule, you use an IoT Central connector in either Power Automate or Azure Logic Apps.
4+
author: dominicbetts
5+
ms.author: dobett
6+
ms.date: 05/12/2020
7+
ms.topic: how-to
8+
ms.service: iot-central
9+
services: iot-central
10+
---
11+
12+
# Use workflows to integrate your Azure IoT Central application with other cloud services
13+
14+
*This article applies to solution builders.*
15+
16+
You can create rules in IoT Central that trigger actions, such as sending an email, in response to telemetry-based conditions, such as device temperature exceeding a threshold.
17+
18+
The IoT Central connector for Power Automate and Azure Logic Apps lets you create more advanced rules to automate operations in IoT Central:
19+
20+
- When a rule fires in your Azure IoT Central app, it can trigger a workflow in Power Automate or Azure Logic Apps. These workflows can run actions in other cloud services, such as Office 365, or a third-party service.
21+
- An event in another cloud service, such as Office 365, can trigger a workflow in Power Automate or Azure Logic Apps. These workflows can run actions or retrieve data from your IoT Central application.
22+
23+
## Trigger a workflow from a rule
24+
25+
Before you can trigger a workflow in Power Automate or Azure Logic Apps, you need a rule in your IoT Central application. To learn more, see [Configure rules and actions in Azure IoT Central](./howto-configure-rules.md).
26+
27+
To add the **Azure IoT Central - preview** connector as a trigger in Power Automate:
28+
29+
1. In Power Automate, select **+ Create**, select the **Custom** tab.
30+
1. Search for *IoT Central*, and select the **Azure IoT Central - preview** connector.
31+
1. In the list of triggers, select **When a rule is fired (preview)**.
32+
1. In the **When a rule is fired** step, select your IoT Central application and the rule you're using.
33+
34+
To add the **Azure IoT Central - preview** connector as a trigger in Azure Logic Apps:
35+
36+
1. In **Logic Apps Designer**, select the **Blank Logic App** template.
37+
1. In the designer, select the **Custom** tab.
38+
1. Search for *IoT Central*, and select the **Azure IoT Central - preview** connector.
39+
1. In the list of triggers, select **When a rule is fired (preview)**.
40+
1. In the **When a rule is fired** step, select your IoT Central application and the rule you're using.
41+
42+
:::image type="content" source="./media/howto-configure-rules-advanced/triggers.png" alt-text="Find the Azure IoT Central - preview connector and choose the trigger":::
43+
44+
You can now add more steps to your workflow to build out your integration scenario.
45+
46+
## Run an action
47+
48+
You can run actions in an IoT Central application from Power Automate and Azure Logic Apps workflows. First, create your workflow and use a connector to define a trigger to start the workflow. Then use the **Azure IoT Central - preview** connector as an action.
49+
50+
To add the **Azure IoT Central - preview** connector as an action in Power Automate:
51+
52+
1. In Power Automate, in the **Choose an action** panel, select the **Custom** tab.
53+
1. Search for *IoT Central* and select the **Azure IoT Central - preview** connector.
54+
1. In the list of actions, select the IoT Central action you want to use.
55+
1. In the action step, complete the configuration for the action you chose. Then select **Save**.
56+
57+
To add the **Azure IoT Central - preview** connector as an action in Azure Logic Apps:
58+
59+
1. In **Logic Apps Designer**, in the **Choose an action** panel, select the **Custom** tab.
60+
1. Search for *IoT Central*, and select the **Azure IoT Central - preview** connector.
61+
1. In the list of actions, select the IoT Central action you want to use.
62+
1. In the action step, complete the configuration for the action you chose. Then select **Save**.
63+
64+
:::image type="content" source="./media/howto-configure-rules-advanced/actions.png" alt-text="Find the Azure IoT Central - preview connector and choose an action":::
65+
66+
## List of actions
67+
68+
The following list shows all the available IoT Central actions in the **Azure IoT Central - preview** connector and their configuration options. Many of the fields can have dynamically generated content. For example, a previous step could determine the device ID that the current step acts on.
69+
70+
### Create or update a device
71+
72+
Use this action to create or update a device in your IoT Central application.
73+
74+
| Field | Description |
75+
| ----- | ----------- |
76+
| Application | Choose from your list of IoT Central applications. |
77+
| Device | The unique ID of the device to create or update. |
78+
| Approved | Choose whether the device has been approved to connect to IoT Central. |
79+
| Device Description | A detailed description of the device. |
80+
| Device Name | The display name of the device. |
81+
| Device Template | Choose from the list of device templates in your IoT Central application. |
82+
| Simulated | Choose whether the device is simulated. |
83+
84+
### Delete a device
85+
86+
Use this action to delete a device from your IoT Central application.
87+
88+
| Field | Description |
89+
| ----- | ----------- |
90+
| Application | Choose from your list of IoT Central applications. |
91+
| Device | The unique ID of the device to delete. |
92+
93+
### Execute a device command
94+
95+
Use this action to execute a command defined in one of the device's interfaces.
96+
97+
| Field | Description |
98+
| ----- | ----------- |
99+
| Application | Choose from your list of IoT Central applications. |
100+
| Device | The unique ID of the device to delete. |
101+
| Device Component | The interface in the device template that contains the command. |
102+
| Device Command | Choose one of the commands on the selected interface. |
103+
| Device Template | Choose from the list of device templates in your IoT Central application. |
104+
| Device Command Request Payload | If the command requires a request payload, add it here. |
105+
106+
> [!NOTE]
107+
> You can't choose a device component until you've chosen a device template.
108+
109+
### Get a device by ID
110+
111+
Use this action to retrieve the device's details.
112+
113+
| Field | Description |
114+
| ----- | ----------- |
115+
| Application | Choose from your list of IoT Central applications. |
116+
| Device | The unique ID of the device to delete. |
117+
118+
You can use the returned details in the dynamic expressions in other actions. The device details returned include: **Approved**, **body**, **Device Description**, **Device Name**, **Device Template**, **Provisioned**, and **Simulated**.
119+
120+
### Get device cloud properties
121+
122+
Use this action to retrieve the cloud property values for a specific device.
123+
124+
| Field | Description |
125+
| ----- | ----------- |
126+
| Application | Choose from your list of IoT Central applications. |
127+
| Device | The unique ID of the device to delete. |
128+
| Device Template | Choose from the list of device templates in your IoT Central application. |
129+
130+
You can use the returned cloud property values in the dynamic expressions in other actions.
131+
132+
### Get device properties
133+
134+
Use this action to retrieve the property values for a specific device.
135+
136+
| Field | Description |
137+
| ----- | ----------- |
138+
| Application | Choose from your list of IoT Central applications. |
139+
| Device | The unique ID of the device to delete. |
140+
| Device Template | Choose from the list of device templates in your IoT Central application. |
141+
142+
You can use the returned property values in the dynamic expressions in other actions.
143+
144+
### Get device telemetry value
145+
146+
Use this action to retrieve the telemetry values for a specific device.
147+
148+
| Field | Description |
149+
| ----- | ----------- |
150+
| Application | Choose from your list of IoT Central applications. |
151+
| Device | The unique ID of the device to delete. |
152+
| Device Template | Choose from the list of device templates in your IoT Central application. |
153+
154+
You can use the returned telemetry values in the dynamic expressions in other actions.
155+
156+
### Update device cloud properties
157+
158+
Use this action to update cloud property values for a specific device.
159+
160+
| Field | Description |
161+
| ----- | ----------- |
162+
| Application | Choose from your list of IoT Central applications. |
163+
| Device | The unique ID of the device to delete. |
164+
| Device Template | Choose from the list of device templates in your IoT Central application. |
165+
| Cloud properties | After you choose a device template, a field is added for each cloud property defined in the template. |
166+
167+
### Update device properties
168+
169+
Use this action to update writeable property values for a specific device.
170+
171+
| Field | Description |
172+
| ----- | ----------- |
173+
| Application | Choose from your list of IoT Central applications. |
174+
| Device | The unique ID of the device to delete. |
175+
| Device Template | Choose from the list of device templates in your IoT Central application. |
176+
| Writeable properties | After you choose a device template, a field is added for each writeable property defined in the template. |
177+
178+
## Next steps
179+
180+
Now that you've learned how to create an advanced rule in your Azure IoT Central application, you can learn how to [Analyze device data in your Azure IoT Central application](howto-create-analytics.md)

articles/iot-central/core/howto-configure-rules.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,4 @@ A restriction applies to rules that are applied to IoT Edge modules. Rules on te
4848

4949
## Next steps
5050

51-
Now that you've learned how to configure a rule in your Azure IoT Central application, you can:
52-
53-
> [!div class="nextstepaction"]
54-
> [Analyze your data on the fly](howto-create-analytics.md)
51+
Now that you've learned how to configure a rule in your Azure IoT Central application, you can learn how to [Configure advanced rules](howto-configure-rules-advanced.md) using Power Automate or Azure Logic Apps.
44.8 KB
Loading
22.3 KB
Loading

0 commit comments

Comments
 (0)