An opinionated boilerplate and demo for a complete Slack bot service with Slack button integration, in Ruby. A good demo of a service built on top of this is playplay.io.
A demo version of this app is running on Heroku at slack-bot-server.herokuapp.com. Use the Add to Slack button. The bot will join your team as @slackbotserver.
Once a bot is registered, you can invite to a channel with /invite @slackbotserver
interact with it. DM "hi" to it, or say "@slackbotserver hi".
A Grape API serving a Slack Ruby Bot to multiple teams. This is a boilerplate that combines a web server, a RESTful API and multiple instances of slack-ruby-bot. It integrates with the Slack Platform API.
Fork this project and roll out a Slack bot service to multiple teams without needing to create separate application instances. This boilerplate is a means to get you started, but you should also be able to take updates from upstream if you want. Your customers can use a Slack button to install your bot. You can start adding slack command handlers on top of this code.
Install MongoDB, required to store teams.
Create a New Application on Slack.
Follow the instructions, note the app's client ID and secret, give the bot a default name, etc. The redirect URL should be the location of your app, for testing purposes use http://localhost:9292
. For a local deployment create a .env
file and add SLACK_CLIENT_ID=...
and SLACK_CLIENT_SECRET=...
in it. Run bundle install
and foreman start
. Navigate to localhost:9292. Register using the Slack button.
If you deploy to Heroku set SLACK_CLIENT_ID
and SLACK_CLIENT_SECRET
via heroku config:add SLACK_CLIENT_ID=... SLACK_CLIENT_SECRET=...
.
- slack-gamebot, free service at playplay.io
- slack-shellbot, free service at shell.playplay.io
- api-explorer, free service at api-explorer.playplay.io
- slack-market, free service at market.playplay.io
Copyright Daniel Doubrovkine, 2015-2016