Update: We have released an official Backlog + Microsoft Teams integration! Please check it out
This is a guide on how you can receive messages in Microsoft Teams whenever your Backlog project is updated.
For example, when a new comment is added to a Backlog issue, a message is automatically posted to Microsoft Teams:
This way, your team can conveniently track updates within Microsoft Teams.
Before going further, some disclaimers:
- Please note that this is not an official integration; instead, we are connecting them using Backlog webhooks and Zapier to send information to Microsoft Teams.
- We are using Zapier’s free plan which currently has a limitation of 5 zaps and 100 tasks per month.
Overview of how the services are connected
Microsoft Teams has a connector called Incoming Webhook which allows Teams users to receive notifications/messages from other web services.
You may ask: Why don’t we send the JSON data directly from the Backlog webhook to Teams? Why do we need to use Zapier in the middle? This is because the data needs to be formatted according to Teams’ specifications. Hence, we are using Zapier to format the data before sending it to Teams.
For information on Backlog’s webhook, please refer to our support articles.
How to use Zapier to connect Backlog to Microsoft Teams
Step 1: Create a zap in Zapier.
For the zap’s workflow, we use Webhooks by Zapier to catch data sent from the Backlog webhook, and then send out a custom request to Teams.
The first part of the Zap (i.e. the trigger) is the Catch Hook. Copy the Custom Webhook URL here. It will be used for pasting into Backlog later, as our Backlog webhook will send data to this URL.
Step 2: Set up the Backlog project webhook
At the Backlog project, go to Project Settings > Integrations, and click on Webhook settings. Note: Only project administrators can access the integrations tab.
Click on Add Webhook, give your webhook a name, and paste the URL that you’d copied from Zapier to the Webhook URL field here. This is the destination in Zapier where our Backlog webhook will be sending information.
Tick the checkboxes to select the events you wish to notify, or tick All events.
Click on Execute to send some test data, then select Add Webhook to create the webhook for this Backlog project.
Step 3: Check Zapier’s catch hook for test information
After sending test data from Backlog in the previous step, the Zapier catch hook will indicate that a request has been received.
Each request received in the catch hook is named under the format: Request A, Request B, Request C, etc. You can select a specific request using the dropdown menu.
After selecting the request, click on the Continue button to go to the next step.
Step 4: Set up Zapier’s custom request with Microsoft Teams
This is part two of our Zap (i.e. the Action) which will send data using the POST method to Microsoft Teams.
Notice the URL field, we will get the address from Microsoft Teams.
At your Microsoft Teams, go to Apps > Connectors, and select Incoming Webhook.
Click on Add to a team.
Find your team or channel name for receiving the Backlog notifications and click Create.
At the next screen, copy the URL for pasting into Zapier in the next step.
Return to Zapier, and paste the copied URL into the URL field.
At the Data field, enter text in the JSON format shown above. Try to insert an available property (e.g. Created User Name) from the request sent from Backlog, this is for testing purposes.
How to insert properties from the Backlog request: When you click on the Data field, an Insert Data module will also appear below it, and you can search or view all.
For details about the properties, please refer to the Backlog API documentation.
Next, go to the Test action step and click on Test & Review.
Within seconds, the response should show that the “Test was successful”. If not, please check that you have entered the data in the correct format as shown above, or you’ve copied the Teams URL correctly.
When the request is successfully sent, your Microsoft Teams will show the message:
Notice that the “Created User Name” property is shown as “Soo hian”. In your case, the name should be yours, not mine . This confirms that we have successfully used a property value from the Backlog request and it’s showing correctly in Microsoft Teams.
We have covered the essential steps in using Zapier to send Backlog data to Teams. Next, we will show how you can further customize/format your message in Zapier using HTML and Markdown.
Step 5: Customize your Zapier message
First, let’s add an issue in the Backlog project and also comment on it, so that we’re sending additional information to Zapier, which we can use to customize and test.
For example, a comment is added to the issue:
At Zapier’s catch hook, we collect the latest request that’s sent from Backlog. Remember to click on Load More to find the latest request, select it and click on Continue.
Then, at Zapier’s custom request, we can start to write our custom JSON message using more available properties in the latest request.
We can use HTML and Markdown to style the look of the message and also create hyperlinks. But note that certain HTML/ Markdown formats may not be supported in the different cards, please check their cards documentation for details.
To keep things simple, the above example is a basic, generic card using HTML and Markdown.
After constructing your message, you can send a test again and see the result in Teams. You may need some patience here, as it’s a trial and error process to get the message to display in the way you want.
Formatted message in Microsoft Teams:
Note: For legacy reasons, the issue status and issue priority are transmitted in Japanese Kanji.
Issue status:
- Open = 未対応
- In Progress = 処理中
- Resolved = 処理済み
- Closed = 完了
Issue priority:
- Low = 低
- Normal = 中
- High = 高
===============
I hope that this post is useful for you.
If you are using Zapier or other integrations with Backlog, please share your tips with us!