Slack Developer Kit for Hubot
Go to GitHub

Slack Developer Kit for Hubot

So you want to get started with ChatOps using Hubot and Slack? We’ve got you covered. Slack Developer Kit for Hubot is an adapter that connects your Hubot scripts to your Slack team, giving you and your fellow DevOps engineers a new best friend: your very own ChatOps bot.

Requirements and Installation

Of course, you’ll need Node.js, as well as NPM. NPM has a great tutorial to help you get started if you don’t have these tools installed. Yeoman is also a great tool for getting started on your first Hubot.

To install, you will first want to create a new Hubot project. The simplest way is to use your computer’s terminal app to invoke Yeoman.

npm install -g yo generator-hubot

This will install the Yeoman Hubot generator. Now we can create that Hubot project:

mkdir my-awesome-hubot && cd my-awesome-hubot
yo hubot --adapter=slack

This script will prompt you to describe the app you are going to build, and create a file that NPM can use to help manage your project.

You will also need to set up a Custom Bot on your Slack team. This will create a token that your hubot can use to log into your team as a bot. Visit the Custom Bot creation page to register your bot with your Slack team, and to retrieve a new bot token

Running Hubot

Once you’ve got your bot set up as you like, you can run your hubot with the run script included (being sure to copy-and-paste your token in!):

HUBOT_SLACK_TOKEN=xoxb-YOUR-TOKEN-HERE ./bin/hubot --adapter slack

Getting Help

If you get stuck, we’re here to help. The following are the best ways to get assistance working through your issue:

  • Issue Tracker for reporting bugs or requesting features.
  • dev4slack channel for getting help using Slack Developer Kit for Hubot or just generally commiserating with your fellow developers.