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/data-factory/how-to-send-notifications-to-teams.md
+30-14Lines changed: 30 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -240,6 +240,9 @@ Before you can send notifications to Teams from your pipelines you must create a
240
240
> [!NOTE]
241
241
> These parameters are used to construct the monitoring URL. Suppose you do not provide a valid subscription and resource group (of the same data factory where the pipelines belong). In that case, the notification will not contain a valid pipeline monitoring URL, but the messages will still work. Additionally, adding these parameters helps prevent the need to always pass those values from another pipeline. If you intend to control those values through a metadata-driven approach, then you should modify them accordingly.
242
242
243
+
> [!TIP]
244
+
> We recommend adding the current Data Factory **Subscription ID**, **Resource Group**, and the **Teams webhook URL** (refer to [prerequisites](#prerequisites)) for the default value of the relevant parameters.
245
+
243
246
1. In the "Configurations" pane, select **Variables**, and then select the **+ New** button define following variables for your pipeline.
244
247
245
248
| Name | Type | Default Value |
@@ -401,26 +404,39 @@ In this sample usage scenario, we will create a master pipeline with three **Exe
401
404
402
405
:::image type="content" source="media/how-to-send-notifications-to-teams/execute-pipeline-activity-2-settings.png" alt-text="Shows the "Execute pipeline" activity "OnSuccess Notification" setting pane for "NotifiyTeamsChannelPipeline" pipeline.":::
403
406
407
+
1. Select third **Execute Pipeline** activity on the canvas, and its "General" pane, to edit its details.
408
+
- Specify **OnFailure Notification** for **Name** of the **Execute Pipeline** activity.
409
+
- In the "Settings" pane, select **NotifiyTeamsChannelPipeline** pipeline for the **Invoked pipeline** property. Customize the parameters as required based on activity type. For example, I customised the parameters this time as follows:
404
410
405
-
3. **Invoke Teams Webhook Url** for **Name** of the **Web** activity.
406
-
4. We recommend adding the current Data Factory **Subscription ID**, **Resource Group**, and the **Teams webhook URL** (refer to
407
-
[prerequisites](#prerequisites)) for the default value of the relevant parameters.
408
-
409
-
:::image type="content" source="media/how-to-send-notifications-to-teams/webhook-recommended-properties.png" alt-text="Shows the recommended properties of the pipeline created by the "Send notification to a channel in Microsoft Teams" template.":::
These parameters are used to construct the monitoring URL. Suppose you do not provide a valid subscription and resource group (of the same data factory where the pipelines belong). In that case, the notification will not contain a valid pipeline monitoring URL, but the messages will still work. Additionally, adding these parameters helps prevent the need to always pass those values from another pipeline. If you intend to control those values through a metadata-driven approach, then you should modify them accordingly.
412
-
413
-
1. Add an **Execute Pipeline** activity into the pipeline from which you would like to send notifications on the Teams channel. Select the pipeline generated from the **Send notification to a channel in Microsoft Teams** template as the **Invoked pipeline** in the **Execute Pipeline** activity.
424
+
- Create a dependency condition for the third **Execute Pipeline** activity so that it only runs if the first **Execute Pipeline** activity fails. To create this dependency, click the red handle on the right side of the first **Execute Pipeline** activity, drag it, and connect it to the third **Execute Pipeline** activity.
425
+
426
+
- Validate, debug, and then publish your **MasterPipeline** pipeline.
427
+
428
+
:::image type="content" source="media/how-to-send-notifications-to-teams/execute-pipeline-activity-3-general.png" alt-text="Shows the "Execute pipeline" activity "OnSuccess Notification" general pane for "NotifiyTeamsChannelPipeline" pipeline.":::
429
+
430
+
:::image type="content" source="media/how-to-send-notifications-to-teams/execute-pipeline-activity-3-settings.png" alt-text="Shows the "Execute pipeline" activity "OnSuccess Notification" setting pane for "NotifiyTeamsChannelPipeline" pipeline.":::
431
+
432
+
1. Run pipeline to receive notifications in Teams. For example, below are sample notifications, when my pipeline ran successfully and when it failed.
414
433
415
-
:::image type="content" source="media/how-to-send-notifications-to-teams/execute-pipeline-activity.png" alt-text="Shows the "Execute pipeline" activity in the pipeline created by the "Send notification to a channel in Microsoft Teams" template.":::
434
+
:::image type="content" source="media/how-to-send-notifications-to-teams/teams-notifications-view-pipeline-run-onsuccess.png" alt-text="Shows on success pipeline notifications in a Teams channel.":::
416
435
417
-
1. Customize the parameters as required based on activity type.
436
+
:::image type="content" source="media/how-to-send-notifications-to-teams/teams-notifications-view-pipeline-run-onfailure.png" alt-text="Shows on failure pipeline notifications in a Teams channel.":::
418
437
419
-
:::image type="content" source="media/how-to-send-notifications-to-teams/customize-parameters-by-activity-type.png" alt-text="Shows customization of parameters in the pipeline created by the "Send notification to a channel in Microsoft Teams" template.":::
420
-
421
-
1. Receive notifications in Teams.
438
+
1. Click the "View pipeline run" button to view pipeline run.
422
439
423
-
:::image type="content" source="media/how-to-send-notifications-to-teams/teams-notifications-view-pipeline-run.png" alt-text="Shows pipeline notifications in a Teams channel.":::
424
440
## Add dynamic messages with system variables and expressions
425
441
426
442
You can use [system variables](control-flow-system-variables.md) and [expressions](control-flow-expression-language-functions.md) to
0 commit comments