azureazure-devopsazure-pipelinesdevopspipeline

Azure DevOps pipeline notification to teams direct message


I am working on pipeline that takes care of pull requests. Everything about it works fine, howerver I would like to notify the developer for which the pull request pipeline is running if the pipeline stops (fail or success). Is it possible to send them a notification through direct message. I dont want to have a teams chat full of these types of notifications, that seems unorganized.

I am expecting a notification in developers dms.

Correction to the question: We are using Teams. I want to send a Teams dm to the author of the pull request when pipeline that was running for given pull request fails or succeeds.


Solution

  • Is it possible to send them a notification through direct message.

    Option1: Using custom notifications in Azure DevOps

    It's suggested to create custom notifications. Go to Project Settings -> Notifications -> New Subscription -> Build -> A build completes -> Customize notification according to your needs.

    enter image description here

    Result: The user will receive notifications in the email like:

    enter image description here

    See the details from Manage notifications for a team, project, or organization.

    Option2: Using pipelines subscriptions in Teams

    If you want your team to receive notifications in Teams channel, you can set up the Azure Pipelines app in Teams and create pipelines subscriptions. Using this method, all users in the channel can see the notification.

    See the details from Integrate Azure Pipelines with Microsoft Teams.


    Update:

    To send notifications to the creator of the source branch of the PR, you can change the notification as mentioned below.

    enter image description here