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/azure-monitor/alerts/alerts-logic-apps.md
+36-3Lines changed: 36 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,9 @@ ms.topic: conceptual
6
6
ms.date: 09/07/2022
7
7
ms.author: edbaynash
8
8
ms.reviewer: edbaynash
9
+
10
+
# Customer intent: As an administrator I want to create a logic app that is triggered by an alert so that I can send emails or Teams messages when an alert is fired.
11
+
9
12
---
10
13
11
14
# Customize alert notifications using Logic Apps
@@ -20,7 +23,7 @@ This article shows you how to create a Logic App and integrate it with an Azure
20
23
21
24
In this example, we'll use the following steps to create a Logic App that uses the [common alerts schema](./alerts-common-schema.md) to send details from the alert. The example uses the following steps:
22
25
23
-
1.[Create a Logic App](#create-a-logic-app)
26
+
1.[Create a Logic App](#create-a-logic-app) for sending an email or a Teams post.
24
27
1.[Create an alert action group](#create-an-action-group) that triggers the logic app
25
28
1.[Create a rule](#create-a-rule-using-your-action-group) the uses the action group.
26
29
## Create a Logic App
@@ -101,8 +104,13 @@ In this example, we'll use the following steps to create a Logic App that uses t
101
104
```
102
105
7. Select the **+** icon to insert a new step.
103
106
:::image type="content" source="./media/alerts-logic-apps/configure-http-request-received.png" alt-text="A screenshot showing the parameters for the when http request received step":::
107
+
108
+
Send an email or post a Teams message.
109
+
110
+
## [Send an email](#tab/send-email)
111
+
104
112
1. In the search field, search for *outlook*.
105
-
1. Select the **Office 365 Outlook**.
113
+
1. Select **Office 365 Outlook**.
106
114
:::image type="content" source="./media/alerts-logic-apps/choose-operation-outlook.png" alt-text="A screenshot showing add action page of the logic apps designer with Office 365 Outlook selected":::
107
115
1. Select **Send an email (V2)** from the list of actions.
108
116
1. Sign into Office 365 when prompted to create a connection.
@@ -122,10 +130,35 @@ For example:
122
130
1. Select **Save**
123
131
:::image type="content" source="./media/alerts-logic-apps/configure-email.png" alt-text="A screenshot showing the parameters tab for the send email action.":::
124
132
125
-
You've created a Logic App that will send an email to the specified address, with details from the HTTP request that triggered it.
133
+
You've created a Logic App that will send an email to the specified address, with details from the alert that triggered it.
134
+
135
+
The next step is to create an action group to trigger your Logic App.
136
+
137
+
## [Post a Teams message](#tab/send-teams-message)
138
+
139
+
1. In the search field, search for *Microsoft Teams*.
140
+
1. Select **Microsoft Teams**
141
+
:::image type="content" source="./media/alerts-logic-apps/choose-operation-teams.png" alt-text="A screenshot showing add action page of the logic apps designer with Microsoft Teams selected":::
142
+
1. Select **Post a message in a chat or channel** from the list of actions.
143
+
1. Sign into Teams when prompted to create a connection.
144
+
1. Select *User* from the **Post as** dropdown.
145
+
1. Select *Group chat* from the **Post in** dropdown.
146
+
1. Select your group from the **Group chat** dropdown.
147
+
1. Create the message text in the **Message** field by entering static text and including content taken from the alert payload by choosing fields from the **Dynamic content** list.
148
+
For example:
149
+
- Enter *Alert:* then select **alertRule** from the **Dynamic content** list.
150
+
- Enter *with severity:* and select **severity** from the **Dynamic content** list.
151
+
- Enter *was fired at:* and select **firedDateTime** from the **Dynamic content** list.
152
+
- Add more fields according to your requirements.
153
+
1. Select **Save**
154
+
:::image type="content" source="./media/alerts-logic-apps/configure-teams-message.png" alt-text="A screenshot showing the parameters tab for the post a message in a chat or channel action.":::
155
+
156
+
You've created a Logic App that will send a Teams message to the specified group, with details from the alert that triggered it.
126
157
127
158
The next step is to create an action group to trigger your Logic App.
128
159
160
+
---
161
+
129
162
## Create an action group
130
163
131
164
To trigger your Logic app, create an action group, then create an alert that uses that action group.
0 commit comments