Notifying Outlook and Teams channel/group from a Microsoft Fabric pipeline
Published Aug 24 2023 10:14 AM 3,391 Views
Microsoft

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.

 

Sally_Dabbah_0-1692894831173.png

Prerequisites:

1.Basic knowledge of Data Factory pipelines.

2.Workspace in Microsoft Fabric. 

3. Teams channel & outlook account (you can do only one of them).

 

Steps:

  1.   Create Pipeline in Fabric Data Factory, click on create pipeline. 
    Sally_Dabbah_0-1692895170416.png

     

  2.  In your pipeline, click on Copy Data
    Sally_Dabbah_1-1692895215102.png
  3. 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: 
    Sally_Dabbah_0-1692896131913.png

    Steps for adding Teams Activity:
    1. 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.

    Sally_Dabbah_2-1692895485015.png

    you should get loading screen (it will create a team's connection) and after it fill the relevant information, in my case:

    Sally_Dabbah_3-1692895627775.png

    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:

    Sally_Dabbah_0-1692895890345.png
    2. Output for Teams activity:
    Sally_Dabbah_1-1692895939993.png

     

    Steps for adding Outlook Activity
    1. In activities tab, drag outlook activity
    2. connect our copy activity on fail to the outlook activity
    3.Same as in teams' activity, in settings tab sign into your outlook account
    4. 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)

     

    Sally_Dabbah_2-1692896489124.png


    5. Output for the Outlook activity:

    Sally_Dabbah_3-1692896703198.png

    You can see in the output that it was classified as important and confidential as i listed in the activity settings.

In Summary, setting up alerts for pipeline failures and sending notifications to a Teams channel can be highly beneficial for the reasons mentioned above, consider notifying your teams/channels/mail to keep up with the production environment. 

Links:

Module 3 - Automate and send notifications with Data Factory - Microsoft Fabric | Microsoft Learn 
How to copy data using copy activity - Microsoft Fabric | Microsoft Learn 


Call-To-Action:

- Make sure to establish all connections before starting to work on Fabric.
- check Linkes mentioned above.

 - Follow me for more tutorials on LinkedIn: Sally Dabbah | LinkedIn

 

 

Co-Authors
Version history
Last update:
‎Aug 24 2023 10:12 AM
Updated by: