Skip to main content
Version: QB15

Sending Notifications to Microsoft Teams

Since QuickBuild 15.0.x, you can send build notifications to Microsoft Teams channel via Teams webhook workflow. Below steps will show you how to configure the integration:

Create webhooks with Workflows for Microsoft Teams

Select More options Microsoft Teams more options icon next to the channel or chat you want to create a workflow for, and then select Workflows Workflow icon.

Then, select Post to a channel when a webhook request is received.

Teams workflow

Input the name of your workflow:

Teams workflow name

On the next page you'll be able to choose the Team, Channel that this notification will post to:

Teams workflow channel

Now, the webhook workflow is created successfully and you can copy the URL for later use in QuickBuild.

Teams workflow URL

Later, if you still want to edit the webhook or if you want to copy the URL, you can go to Apps and search Workflows App:

Workflows App

Then, open the app where you can find the webhook workflow you have just created:

workflow list

Edit the workflow, you can see the URL:

workflow edit

Set up webhooks in QuickBuild

Now, back to QuickBuild, navigate to the configuration which you want to send build notifications to, then in configuration settings, choose Webhook -> Microsoft Teams:

Quickbuild Teams webhook Menu

paste the URL you copied from Microsoft Teams before:

QuickBuild Teams webhook settings

That is it. You can test to see if you can receive the build notifications when the build is triggered

Build Start Message

Build finished message

Customize Notification Message

If you want to use default message, you just need set the message to DEFAULT, and if you don't want to send message for the specific build event, you can just leave empty for that field. You can also customize the notification message by following the Teams message format.

The custom notification message should use Adaptive Card. Below is the default Adaptive Card message for build started event:

note

Adaptive card is in JSON format.

{
"type": "message",
"attachments": [
{
"contentType": "application/vnd.microsoft.card.adaptive",
"content": {
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.5",
"msteams": {
"width": "full"
},
"body": [
{
"type": "Container",
"items": [
{
"type": "TextBlock",
"text": "${title}",
"weight": "bolder",
"size": "large",
"wrap": true,
"style": "heading"
},
{
"type": "FactSet",
"facts": [
{
"title": "Version:",
"value": "[${build.version}](${hostUrl}/build/${build.id})"
},
{
"title": "Configuration:",
"value": "${configuration.pathName}"
},
{
"title": "Begin Date:",
"value": "${build.beginDate}"
}
]
}
]
}
]
}
}
]
}
tip

Just like other scriptable fields in QuickBuild, you can use script in the cards message.