Slack with VSTS
Post messages to Slack in response to events in your VSTS account, like completed builds, code changes, pull requests, releases, work items changes, and more.
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 VSTS integration:
On the VSTS 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 VSTS account.
Create a service hook subscription in your VSTS account
Go to your VSTS project service hooks page:
Click Create Subscription.
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.
VSTS 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.