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 for our version control here at Composable. Conveniently, there’s an official Microsoft integration for Visual Studio Team 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 selection of pretty broad categories (“Post when code is checked in”, for example). However, Team 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 & objects as inputs.
We’ve got this app set up on the cloud instance of Composable, so we know it’ll always be up & running. So there you have it — Slack integration, simple & easy!
- Deploying Composable Resources via Powershell - December 1, 2022
- Composable APIs via Powershell - December 1, 2022
- Enabling Long Paths in Composable - April 6, 2022