Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure DevOps. Get Discord Notification on Specific Pipeline Failure

We have a few pipelines that are taking backups on schedule. We would like to receive notifications on Discord in case if specific Pipelines were to fail.

There is a way to receive an email notification and an official application to integrate Slack into Azure DevOps.

But is there a good way to do that for Discord?

like image 896
WinBoss Avatar asked Oct 31 '25 10:10

WinBoss


1 Answers

You can use the Discord Webhook extension that give you a task to send messages to Discord during your pipeline.

When creating a webhook for a channel in a Discord server, you will be given a url which contains the Channel ID and the Secret Key for that webhook in this format: https://discordapp.com/api/webhooks/{channelId}/{webhookKey}.

You will not need to provide the url to the task, but rather just the Channel ID and Secret Key. (The first section in the link above, Making a Webhook, is all that needs to be followed to be able to use this task).

More info you can find here.

After you know which values put in the task you can dd it to your pipeline and configure it to run only if the pipeline failed with the condition failed().

like image 114
Shayki Abramczyk Avatar answered Nov 03 '25 11:11

Shayki Abramczyk