Sending VSTS Build and Release messages to Microsoft Teams
A while back I noticed a VSTS add-in for sending messages to Slack from a VSTS Build or Release process. This was a great idea and thought that mentioned that it would be great to have an equivalent for Microsoft Teams, to which the response was:
Maybe an opportunity to contribute a similar one for Teams? :-)
— Buck Hodges (@tfsbuck) December 28, 2016
Microsoft has already created Microsoft Teams integration to VSTS, but it is using service hooks and you cannot create a personalised message as part of the build process. So after a month or so I got to it, then I went snowboarding in Japan (it was awesome, thanks for asking). But now, I give you the Post To Office 365 Connector VSTS Add-in for Build and Release management.
This was originally built with the mindset of sending a message to a Microsoft Teams channel; but unlike Slack, Teams does not provide a webhook URL to simply send a message to. Instead it requires you to create an Office365 connector and select the Incoming Webhook option, which is a little extra work but not too much additional effort.
What this provided was the ability to scope out further what this add-in can do. Instead of just posting to Teams, it allows you to use Connectors in Office365 Groups in Outlook, as well as the upcoming Connectors for individual users. When using the add-in your message can contain Markdown syntax, which looks lovely in Office365 groups, but is sadly lacking in Teams.
I hope for this to change in the near future as Teams is still in Preview. In the future I intend on adding additional features such as actions and sections of information, but this is a great first step. I’m also tossing up the idea of placing this on GitHub for others to contribute.