Integrating Microsoft Teams as a Notification channel in BizTalk360

|  Posted: July 18, 2017  |  Categories: BizTalk360 Logic Apps

Recently in one of our support tickets, a customer enquired on whether Microsoft Teams as a notification channel would be implemented in upcoming releases, as he heard of it in the INTEGRATE 2017 event, where Saravana introduced ServiceBus360 and Teams was one of the notification channels there.

You can download the entire article as a PDF document.
Integrating Microsoft Teams as a Notification channel in BizTalk360

Therefore, I thought if I could provide an alternate workaround to achieve the same in BizTalk360. This often occurs in Support where if we don’t have the functionality currently in the product, we do strive to provide a similar working functionality by discussing it with the development team. Here is my implementation of the feature request by using Logic Apps & WebHook Notification Channel.

Create the Channel in Microsoft Teams

Integrating Microsoft Teams as a Notification channel in BizTalk360

Integrating Microsoft Teams as a Notification channel in BizTalk360

Once the Team has been given a suitable name and was successfully created, then we can create a new channel for that Team. (Click the … near the newly created Team and choose ‘Add channel’.

Once the Channel has been created we can use the Team name & Channel Name in the Azure portal as the destination for the Post Message (Teams).

This can be achieved via Logic Apps or by creating a custom Notification channel. We will have a quick look at both the implementations.

You can download the entire article as a PDF document.
Integrating Microsoft Teams as a Notification channel in BizTalk360

1. Implementation via Logic Apps

Configuration in Logic Apps:

So I created a Demo Logic App, and here is a screenshot of the design used.

Integrating Microsoft Teams as a Notification channel in BizTalk360

I’ve used a Request-Response and added an Azure function to help Parse the JSON response received from the BizTalk360 Notification channel and then passed that composed message to a Post message action for Microsoft Teams. Azure will ask you to authenticate your login (Teams) and then allow you to select the specific Team and Channel from Microsoft Teams.

In the 1st Request, you will also need to supply the Request Body JSON Schema or use sample Payload to generate the schema. Please refer to this code for the Schema I used.

Azure Function Code implementation

To access the code used for the Azure function, please access this code at Github website.

Integrating Microsoft Teams as a Notification channel in BizTalk360

Configuring BizTalk360 WebHook Notification Channel for the Logic App

Please refer to this article which describes how to set up Webhook notification Channel.

https://assist.biztalk360.com/support/solutions/articles/1000245561-adding-a-webhook-notification-channel

You can get the URL for the Web API from the Logic App – refer to the screenshot earlier provided and the arrows identify where to get the URL from. Use that in configuring the BT360 webhook notification channel.

Integrating Microsoft Teams as a Notification channel in BizTalk360

Once the WebHook Notification Channel is configured, you can select it as the notification option in the specific Alarm
Integrating Microsoft Teams as a Notification channel in BizTalk360

Receiving the Notifications

Once the Threshold is violated, similar to the Email notifications, you will now see a notification in Microsoft Teams.

Integrating Microsoft Teams as a Notification channel in BizTalk360
While I have parsed the JSON message and only displayed the Application Name & Artifact Name that has the error, you can choose and customize your error messages as required.

2. Implementation via Custom Notification Channel

You can read these articles which show how to create a custom notification channel.

https://blogs.biztalk360.com/introduction-custom-notification-channel-sdk-biztalk360/

https://assist.biztalk360.com/support/solutions/articles/1000217940-adding-a-new-custom-notification-channel

You need to select the WebHook Connector from Microsoft teams. You need to copy the WebHook URL which you will then enter the code in the custom notification channel.

Integrating Microsoft Teams as a Notification channel in BizTalk360

You then need to setup the Custom Notification Channel as mentioned in the blogs.

Then you only need to add this code to the FileChannel.cs file either instead of after the successful completion of File notification completed. Again I have only output Alarm Name and an Error string. Please customize as required.

Integrating Microsoft Teams as a Notification channel in BizTalk360

So I hope this blog gave you a good idea as to how you can integrate Teams with BizTalk360 Notifications.

You can download the entire article as a PDF document.
Integrating Microsoft Teams as a Notification channel in BizTalk360
Author: Rochelle Saldanha

Rochelle Saldanha is currently working in the Customer Support & Client Relationship Teams at BizTalk360. She loves travelling and watching movies.

One Platform Operations, Monitoring and Analytics Software
BizTalk360

microsoft biztalk

Learn more

Over 500 customers across 30+ countries depend on BizTalk360

ServiceBus360

Azure service bus

Learn more

Start managing your Azure Service Bus namespaces in minutes

One Platform - Operations, Monitoring and Analytics Software
BizTalk360

microsoft biztalk

Learn more

Over 500 customers across 30+ countries depend on BizTalk360

One Platform - Operations, Monitoring and Analytics Software
ServiceBus360

Azure service bus

Learn more

Start managing your Azure Service Bus namespaces in minutes

Back to Top