Quick and dirty Akka Slack integration

Hi there, hope you had a great christmas and are getting ready for the new year.

So I was just working on an integration of our platform with Slack to notify our development team of some events in the platform and thought it would be nice to share with everybody else how to do a quick and dirty slack integration from Akka.

Slack has a very nice documentation regarding incoming-webhooks, but I really wanted something very quick to implement without “reinventing the wheel” and Akka does have some really nice integration with camel so this little project uses Akka and the akka-camel integration, Camel by the way already has a Slack component so it was very easy to get this working.

Some caveats first, I got some early configuration done in an application.conf file in the resources folder. So you should get a token from slack and put it there in the slack.token reference. as well as the channel where you want to send the messages to. Also the camel-slack component uses either a blueprint configuration either a spring bean, so I went with the spring bean using the wonderful spring-scala library from Pivotal which is now maintained by Paul Snively.

Here’s the link for the github project, enjoy and have fun.

Show your support

Clapping shows how much you appreciated Hugo Matinho’s story.