Notifying Outlook and Teams channel/group from a Microsoft Fabric pipeline
Introduction
Setting up alerts for pipeline failures on a Teams channel/outlook mail enhances communication, collaboration, and problem-solving within your team. It creates a streamlined workflow for addressing issues, reduces downtime, and promotes a culture of continuous improvement in managing your data pipelines.
In this blog, I’ll showcase a method for sending notifications to both Teams channels/groups and Outlook emails. Microsoft Fabric now includes Teams activity as a recent addition.
Prerequisites
- Basic knowledge of Data Factory pipelines.
- Workspace in Microsoft Fabric.
- Teams channel & outlook account (you can do only one of them).
Steps
- Create Pipeline in Fabric Data Factory, click on create pipeline.
- In your pipeline, click on Copy Data
- create a basic copy activity – Fill all the details and make sure that it will fail this is the use case that we want to be notified on.
PS: connect to the teams and the outlook activities on fail in the copy activity like so:
Steps for adding Teams Activity
- Add Teams activity by navigating to the Activities tab and dragging the Teams activity onto the canvas. Then, within the Settings tab, log in to your Teams account.
You should get loading screen (it will create a team’s connection) and after it fill the relevant information, in my case:
I chose to send a message to a teams channel called “test teams channel”.
In message tab, i attached the output of the copy activity.@concat('Copy Activity Failed, Details:',activity('Copy data').output)
details of settings in Teams activity: - Output for Teams activity:
Steps for adding Outlook activity
- In activities tab, drag outlook activity
- Connect our copy activity on fail to the outlook activity
- Same as in teams’ activity, in settings tab sign into your outlook account
- Fill relevant information about the failure, in advanced tab, i choose to be sensitivity to be confidential
@concat('Copy activity in Notification pipeline failed, details:',activity('Copy data').output)
- Output for the Outlook activity:
- You can see in the output that it was classified as important and confidential as I listed in the activity settings.
Resources
Module 3 – Automate and send notifications with Data Factory – Microsoft Fabric | Microsoft Learn
How to copy data using copy activity – Microsoft Fabric | Microsoft Learn