Simplest Slack bot of yours

robot-character In our team at legelisten.no we had HipChat as a main way of communication before. But recently we’ve migrated to Slack and do not feel regret.

One thing I feel missing there was Standup Bot which we used to write and read each other standup messages during the day.

Functions of this standup bot were deadly simple: it can save your message and it can show you all messages from all team members for today.

So long story short, I decided to make the same bot for slack. I’ve seen some alternatives, but they seemed too complicated for such simple issue.

I made my own Ruby (Sinatra) + MongoDB – based bot.

How to make the simplest Slack bot?

  1. Choose outgoing webhooks instead of slask app. You can read about this hooks here: https://api.slack.com/outgoing-webhooks
  2. Create simple sinatra app with one route for POST.
  3. Point your webhook to that route you just created.
  4. Do whatever you want with data you have from Slack.
  5. Respond with simple JSON like {text: “your bot’s answer here”}
  6. PROFIT!

You can have a look to my slask bot here: https://github.com/kiote/standup-bot

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s