Here at Composable, we use Slack for most of our day-to-day communications among the team; but much of the benefit of Slack comes from using its fairly robust API to have various other webapps and programs interact with or post to Slack automatically. As such, we’ve implemented a Slack Output Module in Composable that allows posting of messages and attachments to any channel — and we use it daily!
We use TFS and Visual Studio Team Services, now Azure DevOps, for our version control here at Composable. Conveniently, there’s an official Microsoft integration for Azure DevOps Services in Slack which lets us post to a channel whenever a new bug ticket gets created or whenever code gets checked in. However, what if we want to do something a little more complex? We have some automated check-ins that happen from time to time, and we don’t want those clogging up our channel! The official integration doesn’t offer much fine-grained control over what gets posted — it only allows the selection of pretty broad categories (“Post when code is checked in”, for example). However, Azure DevOps Services also allows you to send a notification to an arbitrary webhook URL on that event, rather than just to Slack itself. And who would happen to have an easy way to receive that notification? Well…

Now that we can get the notification into Composable (Team Services sends a JSON with all the relevant information about the check-in), it’s simple to perform a couple checks (was this checked in by our automated user or by a real person?) and decide whether we really do want to post this message. If so, we sprinkle in a little random encouragement for the user who checked things in…

…and we’ve got a message that’s ready to send! And thanks to the Composable Slack Module, it’s as simple as passing any arbitrary text and objects as inputs.

We’ve got this DataLow Application set up on the cloud instance of Composable, so we know it will always be up and running.

So there you have it — Slack integration, simple & easy!
