A Slack bot that randomly shuffles people into small lunch groups.
- Node.js 8.*
- MongoDB 2.6.*
- Create a new Slack App, entering
https://[BASEURL]/oauth
for the Redirect URI. - Go to the App Credentials page and make a note of the Client ID, Client Secret and Verification Token values. You’ll need to enter them into the
slack
section of the server config later. - Go to the Bot Users page and create a bot (can be any name you want).
- Go to the Interactive Messages page and set the Request URL to
https://[BASEURL]/oauth
. - Go to the Slash Commands page and create a new command and set the Command to
/lunchshuffle
, Request URL tohttps://[BASEURL]/command
and Usage Hint tostart | finish
.
- Setup server/hosting with a valid SSL certificate (Slack requires HTTPS to send events to the app).
- Duplicate
config.sample.yaml
, rename toconfig.yaml
and change the configuration to match your setup (this is where you’ll want to enter your Slack App’s credentials). The config can also be specified via aconfig.json
file or environment variables (e.g:slack_id
) if that’s your jam. - Upload the files to your server.
- Run
npm install --prod
. - Start the Node server by running
node .
in the app’s root directory. - (Optional) Configure the reverse proxy server (e.g: Nginx) that’s in-front of the Node server to serve the
app/public
directory as static files.
- Go to the server's URL, enter the password you configured and then click Add to Slack button to authorise the bot with your Slack team.
- Enter
/lunchshuffle start
in any channel to start a lunch shuffle in that channel. - Enter
/lunchshuffle finish
in the same channel when it’s time for lunch to shuffle everyone that joined into their groups. - Enjoy lunch with your new friends!
Slack lunch shuffle is released under the ISC license.
Copyright © 2016, Roland Warmerdam.