web analytics
Press "Enter" to skip to content

Composable / Slack Integration

Lars Fiedler 0

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…

How convenient!
How convenient!

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…

We're pretty hilarious around here.
We’re pretty hilarious around here.

…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.

slack_input_output

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!

pun_2
Seriously, hilarious.

Lars Fiedler

Lars has comprehensive expertise building large complex software systems, and has served as a Software Engineer at MIT’s Lincoln Laboratory since 2010, where he began developing Composable Analytics. Prior to joining Lincoln Laboratory, Lars worked as a Software Engineer at Microsoft Corporation from 2006 to 2010. Lars received his MS in Computer Science from Georgia Institute of Technology in 2004, and his BS in Computer Science from Georgia Tech in 2003.

Leave a Reply

Your email address will not be published. Required fields are marked *