Slack is a messaging app for thousands of teams around the world.
SquidBot is a Slack bot written in ruby that connects via the Slack API and helps team members send anonymous messages to other members.
Think of SquidBot as a good way for team members to be honest with each other and quickly build trust.
I recommend one rule for all users: "Say Nothing Hateful".
To run your own version of SquidBot you need:
- a Slack account to send and receive team messages
- Ruby 2.3 and installed on your computer
- Github setup via the command line or the Github Desktop app
- a free Heroku hosting account for the SquidBot code and Kaffeine to keep your server awake.
-
Download the SquidBot code
git clone https://github.com/wisesumo/squidbot.git cd squidbot
-
Install dependencies (Bundler is recommended.)
bundle install
-
Run SquidBot locally using Sinatra
ruby app.rb
-
Deploy SquidBot to Heroku Note: Copy your newly deployed Heroku URL because you will need it later when configuring Slack.
$ git init $ git add . $ git commit -m 'launching SquidBot' $ heroku create $ git push heroku master
-
Add SquidBot to your Slack team by using both the slash command and incoming webhook custom integration features of the Slack apps platform
Slash Command: select custom integration and click on the slash commands link select "Add Configuration" on the next page and name your slash command "Squid" and follow the remaining instructions on the next page fill in the URL field with your deployed Heroku URL (copied earlier) make sure your endpoint is https and you set the Method as GET - Hit "Save Integration" Incoming WebHook: select custom integration and click on the Incoming WebHooks link on the Configuration page, select the channel you want SquidBot to appear and follow the remaining instructions. the following page will show a Webhook URL. Please copy the Webhook URL. Open a command line / Terminal window and set up a Heroku environment variable using the saved Webhook URL. From the command line inside the project directory, run: heroku config:set SLACK_WEBHOOK_URL=https://hooks.slack.com/services/your-webhook-url ALL DONE!
Note: To test SquidBot, enter the channel you selected during the Slack setup and begin typing with /squid [your message text]