Integrate an Automation rule with Microsoft Teams

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

If you want to send a message to a Microsoft Teams channel, you first need to integrate Microsoft Teams and Automation for Jira Server. This provides a webhook URL that Automation for Jira uses to send messages to your Microsoft Teams channels. This integration can be revoked at any time.

Solution

Setting up a Microsoft Teams integration can be done in a few simple steps:

  1. Navigate to Microsoft Teams, choose More options (...) next to the channel name, then choose Connectors

  2. Scroll through the list of Connectors to Incoming Webhook, and choose Add

  3. Enter Automation for Jira as the name for the webhook, upload an image to associate with data from the webhook (you can download and use Curly), and choose Create

  4. Copy the webhook URL to the clipboard and choose Done

  5. The next steps will depend on the Automation For Jira version that you are using

    1. For Automation For Jira on any version below 9.0.0

      1. Go to your Automation rule and the Send Microsoft Teams Notification action

      2. Paste the webhook URL from step 4 into the Webhook URL field

        Microsoft teams message Webhook url

    2. For Automation For Jira on any version from 9.0.0

      1. Create a new Secret Key by following the instructions from this documentation and using the Webhook URL obtained from the Microsoft Teams interface

      2. Go to your Automation rule and the Send Microsoft Teams Notification action

      3. Click on the Webhook URL dropdown menu and select the secret key created earlier

        Secret key to integrate MS teams and JIRA

All done! You are now integrated with your Microsoft Teams Channel.

Markdown support

Microsoft Team messages support basic markdown for rich formatting. The only limitations are you can't insert:

  • Images

  • Inline HTML

  • HTML Blocks

  • Custom nodes

Tip

If you're using characters such as # or * and you want them to appear as characters in your message content, you need to escape them else they'll be performing a markdown function. You can do this surrounding them with backslashes e.g. \#\

Example

Send a message to a Microsoft Teams channel when a bug is raised:

Automation alert the team when bug is raised via Ms Teams

The message body is using smart values formatted with markdown language:

Breakdown of Teams message in Automation

When this rule is triggered, a message in Microsoft Teams looks like this:

Sample teams messages as sent by Automation for jira

Done! You should now be able to be able to send messages with Microsoft Teams.

Updated on July 11, 2024

Still need help?

The Atlassian Community is here for you.