Monday, November 23, 2015

Building a Slackbot with Ruby and Sinatra

slackbot

This article was peer reviewed by Thom Parkin. Thanks to all of SitePoint's peer reviewers for making SitePoint content the best it can be!

Slack seems to be everywhere these days. It is enjoying the kind of success and adoption that other services can only dream about. Part of the reason for its success is how easy it is to integrate Slack with other services. There are tons of integrations out-of-the-box, along with web hooks and other integration methods that make using Slack with your favorite service a breeze.

Another way Slack offers extensibility is "Slackbots". Slackbots are items that can be configured to fire based on a keyword typed into Slack.

Today we're going to see how to build a custom Slackbot that triggers on a keyword, performs some action, and responds back to Slack. We're gonna build it using Ruby and the Sinatra web framework. There's no database involved in this tutorial, but you could extend it and add one if you so desire. This is a basic tutorial that gives you a taste of building a Slack extension. We're making a brick here with which you can build other things.

Continue reading %Building a Slackbot with Ruby and Sinatra%


by Vinoth via SitePoint

No comments:

Post a Comment