Skip to content

Commit 57a80e3

Browse files
committed
Updated screenshots
1 parent a4732ba commit 57a80e3

File tree

5 files changed

+15
-9
lines changed

5 files changed

+15
-9
lines changed
28 KB
Loading
24.7 KB
Loading
65.3 KB
Loading
25.6 KB
Loading

articles/event-grid/publish-iot-hub-events-to-logic-apps.md

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
title: Tutorial - Use IoT Hub events to trigger Azure Logic Apps
33
description: This tutorial shows how to use the event routing service of Azure Event Grid, create automated processes to perform Azure Logic Apps actions based on IoT Hub events.
44
services: iot-hub, event-grid
5-
author: philmea
5+
author: kgremban
66
ms.service: iot-hub
77
ms.topic: tutorial
88
ms.date: 09/14/2020
9-
ms.author: philmea
9+
ms.author: kgremban
1010
ms.custom: devx-track-azurecli
1111
---
1212

@@ -56,13 +56,13 @@ Next, create a logic app and add an HTTP event grid trigger that processes reque
5656

5757
1. In the [Azure portal](https://portal.azure.com), select **Create a resource**, then type "logic app" in the search box and select return. Select **Logic App** from the results.
5858

59-
![Create logic app](./media/publish-iot-hub-events-to-logic-apps/select-logic-app.png)
59+
:::image type="content" source="./media/publish-iot-hub-events-to-logic-apps/select-logic-app.png" alt-text="Screenshot of how to select the logic app from a list of resources." lightbox="./media/publish-iot-hub-events-to-logic-apps/select-logic-app.png":::
6060

6161
1. On the next screen, select **Create**.
6262

63-
1. Give your logic app a name that's unique in your subscription, then select the same subscription, resource group, and location as your IoT hub.
63+
1. Give your logic app a unique name in your subscription, then select the same subscription, resource group, and location as your IoT hub. Choose the **Consumption** plan type.
6464

65-
![Fields for create logic app](./media/publish-iot-hub-events-to-logic-apps/create-logic-app-fields.png)
65+
:::image type="content" source="./media/publish-iot-hub-events-to-logic-apps/create-logic-app-fields.png" alt-text="Screenshot of how to configure your logic app." lightbox="./media/publish-iot-hub-events-to-logic-apps/create-logic-app-fields.png":::
6666

6767
1. Select **Review + create**.
6868

@@ -72,6 +72,8 @@ Next, create a logic app and add an HTTP event grid trigger that processes reque
7272

7373
1. In the Logic Apps Designer, page down to see **Templates**. Choose **Blank Logic App** so that you can build your logic app from scratch.
7474

75+
:::image type="content" source="./media/publish-iot-hub-events-to-logic-apps/logic-app-designer-template.png" alt-text="Screenshot of how to configure your logic app." lightbox="./media/publish-iot-hub-events-to-logic-apps/logic-app-designer-template.png":::
76+
7577
### Select a trigger
7678

7779
A trigger is a specific event that starts your logic app. For this tutorial, the trigger that sets off the workflow is receiving a request over HTTP.
@@ -86,12 +88,14 @@ A trigger is a specific event that starts your logic app. For this tutorial, the
8688

8789
![Use sample payload](./media/publish-iot-hub-events-to-logic-apps/sample-payload.png)
8890

91+
1. Copy the `json` below and replace the placeholder values `<>` with your own.
92+
8993
1. Paste the *Device connected event schema* JSON into the text box, then select **Done**:
9094

9195
```json
9296
[{
9397
"id": "f6bbf8f4-d365-520d-a878-17bf7238abd8",
94-
"topic": "/SUBSCRIPTIONS/<subscription ID>/RESOURCEGROUPS/<resource group name>/PROVIDERS/MICROSOFT.DEVICES/IOTHUBS/<hub name>",
98+
"topic": "/SUBSCRIPTIONS/<azure subscription ID>/RESOURCEGROUPS/<resource group name>/PROVIDERS/MICROSOFT.DEVICES/IOTHUBS/<hub name>",
9599
"subject": "devices/LogicAppTestDevice",
96100
"eventType": "Microsoft.Devices.DeviceConnected",
97101
"eventTime": "2018-06-02T19:17:44.4383997Z",
@@ -100,7 +104,7 @@ A trigger is a specific event that starts your logic app. For this tutorial, the
100104
"sequenceNumber":
101105
"000000000000000001D4132452F67CE200000002000000000000000000000001"
102106
},
103-
"hubName": "egtesthub1",
107+
"hubName": "<hub name>",
104108
"deviceId": "LogicAppTestDevice",
105109
"moduleId" : "DeviceModuleID"
106110
},
@@ -140,7 +144,7 @@ Actions are any steps that occur after the trigger starts the logic app workflow
140144

141145
Your email template may look like this example:
142146

143-
![Fill out email information](./media/publish-iot-hub-events-to-logic-apps/email-content.png)
147+
:::image type="content" source="./media/publish-iot-hub-events-to-logic-apps/email-content.png" alt-text="Screenshot of how to create an event email in the template." lightbox="./media/publish-iot-hub-events-to-logic-apps/email-content.png":::
144148

145149
1. Select **Save** in the Logic Apps Designer.
146150

@@ -193,7 +197,7 @@ In this section, you configure your IoT Hub to publish events as they occur.
193197

194198
When you're done, the pane should look like the following example:
195199

196-
![Sample event subscription form](./media/publish-iot-hub-events-to-logic-apps/subscription-form.png)
200+
:::image type="content" source="./media/publish-iot-hub-events-to-logic-apps/subscription-form.png" alt-text="Screenshot of your 'Create Event Subscription' page in the Azure portal." lightbox="./media/publish-iot-hub-events-to-logic-apps/subscription-form.png":::
197201

198202
1. Select **Create**.
199203

@@ -209,6 +213,8 @@ Test your logic app by quickly simulating a device connection using the Azure CL
209213
az iot hub device-identity create --device-id simDevice --hub-name {YourIoTHubName}
210214
```
211215
216+
This could take a minute. You'll see a `json` printout once it's created.
217+
212218
1. Run the following command to simulate connecting your device to IoT Hub and sending telemetry:
213219
214220
```azurecli

0 commit comments

Comments
 (0)