Post messages to Slack in response to events in your Visual Studio Team Services account, like completed builds, code changes, and new and updated work items.
Create the Slack integration
From any page on your team's Slack (
https://[team].slack.com/...), click your account name in the left window pane to open up the menu, and find Apps and integrations:
Search for and click the Visual Studio Team Services integration:
On the Visual Studio Team Services integration page, click Install.
- Choose a channel to have notifications posted to from the dropdown and click Add Visual Studio Integration.
- Scroll down the page and copy the web hook URL to use when you create the service hook subscription in your Visual Studio Team Services account.
Create a service hook subscription in your Visual Studio Team Services account
From your Visual Studio Team Services account's team project page (
https://[account].visualstudio.com/[project]), navigate to Service Hooks in the settings:
Click Create subscription and select the Slack service.
Choose the types of events you want to appear in your Slack channel.
You can filter each of the triggers in specific ways. For example, the pull request created trigger can be filtered on the repository in which the pull request occurs, the target branch it applies to, and the team members that are required or invited to review the request.
Paste the web hook URL from the Slack integration that you created and click Finish.
Now, when the event you configured happens in your project, a notification will apear in your team's Slack channel.
Visual Studio Team Services doesn't charge for the framework for integrating with external services. Check out the specific service's site for pricing related to their services.
Q & A
Q: Why don't I have the pull request events as an option when I configure my trigger?
A: Pull requests are only available with team projects that use Git. If your team project uses TFVC, pull event triggers aren't available, and your code event is called "Code checked in" instead of "Code pushed".
Q: How can I get multiple events to show up in my Slack channel?
A: Create a new subscription for each type of event you want. For example, if you want to see build failures and new work items in your Slack channel, create two additional subscriptions.