You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/event-grid/publish-iot-hub-events-to-logic-apps.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ ms.custom: devx-track-azurecli
14
14
15
15
Azure Event Grid enables you to react to events in IoT Hub by triggering actions in your downstream business applications.
16
16
17
-
This article walks through a sample configuration that uses IoT Hub and Event Grid. At the end, you have an Azure logic app set up to send a notification email every time a device connects or disconnects to your IoT hub. Event Grid can be used to get timely notification about critical devices disconnecting. Metrics and Diagnostics can take several (i.e. 20 or more -- though we don't want to put a number on it) minutes to show up in logs/alerts. That might be unacceptable for critical infrastructure.
17
+
This article walks through a sample configuration that uses IoT Hub and Event Grid. At the end, you have an Azure logic app set up to send a notification email every time a device connects or disconnects to your IoT hub. Event Grid can be used to get timely notification about critical devices disconnecting. Metrics and Diagnostics can take several minutes (such as 20 minutes or more) to show up in logs / alerts. Longer processing times might be unacceptable for critical infrastructure.
@@ -28,7 +28,7 @@ This article walks through a sample configuration that uses IoT Hub and Event Gr
28
28
29
29
You can quickly create a new IoT hub using the Azure Cloud Shell terminal in the portal.
30
30
31
-
1. Signin to the [Azure portal](https://portal.azure.com).
31
+
1. Sign-in to the [Azure portal](https://portal.azure.com).
32
32
33
33
1. On the upper right of the page, select the Cloud Shell button.
34
34
@@ -46,7 +46,7 @@ You can quickly create a new IoT hub using the Azure Cloud Shell terminal in the
46
46
az iot hub create --name {your iot hub name} --resource-group {your resource group name} --sku S1
47
47
```
48
48
49
-
1. Minimize the Cloud Shell terminal. You will return to the shell later in the tutorial.
49
+
1. Minimize the Cloud Shell terminal. You'll return to the shell later in the tutorial.
50
50
51
51
## Create a logic app
52
52
@@ -125,7 +125,7 @@ A trigger is a specific event that starts your logic app. For this tutorial, the
125
125
126
126
Actions are any steps that occur after the trigger starts the logic app workflow. For this tutorial, the action is to send an email notification from your email provider.
127
127
128
-
1. Select **New step**. This opens a window to **Choose an action**.
128
+
1. Select **New step**. A window appears, prompting you to **Choose an action**.
129
129
130
130
1. Search for **Outlook**.
131
131
@@ -141,7 +141,7 @@ Actions are any steps that occur after the trigger starts the logic app workflow
141
141
142
142
***To**: Enter the email address to receive the notification emails. For this tutorial, use an email account that you can access for testing.
143
143
144
-
***Subject**: Fill in the text for the subject. When you click on the Subject text box, you can select dynamic content to include. For example, this tutorial uses `IoT Hub alert: {eventType}`. If you can't see Dynamic content, select the **Add dynamic content** hyperlink -- this toggles it on and off.
144
+
***Subject**: Fill in the text for the subject. When you click on the Subject text box, you can select dynamic content to include. For example, this tutorial uses `IoT Hub alert: {eventType}`. If you can't see **Dynamic content**, select the **Add dynamic content** hyperlink to toggle the **Dynamic content** view on or off.
145
145
146
146
After selecting `eventType`, you'll see the email form output so far. Select the **Send and email (V2)** to edit the body of your email.
147
147
@@ -157,7 +157,7 @@ Actions are any steps that occur after the trigger starts the logic app workflow
157
157
158
158
### Copy the HTTP URL
159
159
160
-
Before you leave the Logic Apps Designer, copy the URL that your logic apps is listening to for a trigger. You use this URL to configure Event Grid.
160
+
Before you leave the Logic Apps Designer, copy the URL that your logic app is listening to for a trigger. You use this URL to configure Event Grid.
161
161
162
162
1. Expand the **When a HTTP request is received** trigger configuration box by clicking on it.
163
163
@@ -171,7 +171,7 @@ Before you leave the Logic Apps Designer, copy the URL that your logic apps is l
171
171
172
172
In this section, you configure your IoT Hub to publish events as they occur.
173
173
174
-
1. In the Azure portal, navigate to your IoT hub. You can do this by selecting **Resource groups**, then select the resource group for this tutorial, and then select your IoT hub from the list of resources.
174
+
1. In the Azure portal, navigate to your IoT hub. You can find your IoT hub by selecting **IoT Hub** from your Azure dashboard, then select your IoT hub instance from the list of resources.
175
175
176
176
1. Select **Events**.
177
177
@@ -212,25 +212,25 @@ In this section, you configure your IoT Hub to publish events as they occur.
212
212
213
213
Test your logic app by quickly simulating a device connection using the Azure CLI.
214
214
215
-
1. Select the Cloud Shell button to re-open your terminal.
215
+
1. Select the Cloud Shell button to reopen your terminal.
216
216
217
217
1. Run the following command to create a simulated device identity:
218
218
219
219
```azurecli
220
220
az iot hub device-identity create --device-id simDevice --hub-name {YourIoTHubName}
221
221
```
222
222
223
-
This could take a minute. You'll see a `json` printout once it's created.
223
+
The processing could take a minute. You'll see a JSON printout in your console once it's created.
224
224
225
225
1. Run the following command to simulate connecting your device to IoT Hub and sending telemetry:
226
226
227
227
```azurecli
228
228
az iot device simulate -d simDevice -n {YourIoTHubName}
229
229
```
230
230
231
-
1. When the simulated device connects to IoT Hub, you will receive an email notifying you of a "DeviceConnected" event.
231
+
1. When the simulated device connects to IoT Hub, you'll receive an email notifying you of a "DeviceConnected" event.
232
232
233
-
1. When the simulation completes, you will receive an email notifying you of a "DeviceDisconnected" event.
233
+
1. When the simulation completes, you'll receive an email notifying you of a "DeviceDisconnected" event.
@@ -242,7 +242,7 @@ To delete all of the resources created in this tutorial, delete the resource gro
242
242
243
243
1. Select **Resource groups**, then select the resource group you created for this tutorial.
244
244
245
-
2. On the Resource group pane, select **Delete resource group**. You are prompted to enter the resource group name, and then you can delete it. All of the resources contained therein are also removed.
245
+
2. On the Resource group pane, select **Delete resource group**. You're prompted to enter the resource group name, and then you can delete it. All of the resources contained therein are also removed.
0 commit comments