A simple dummy-server for using Slack slash commands against
- Deploy this app to heroku using the button above or host it online some other way. Note down its URL.
- Ensure it works, by seeing that it responds at https://my-heroku-app.herokuapp.com/weather (HTTPS required)
- Go to Slack apps and find Slash Commands
- Add a command, with URL pointing at on of the endpoints in the server above (e.g.
https://my-heroku-app.herokuapp.com/weather) - Change
icon,name,command,autocomplete help textas you see fit - Note down the
Tokenfor the Slash command. Add it to the environment variableSLACK_API_KEYon the server. On heroku, this can be done on Heroku dashboard, underyour app>Settings>Config Variables - Save your Slash command and test it in your slack channel by typing
/your-command
If you need to accept multiple tokens (i.e. have multiple slash commands), separate them with ; in the environment variable SLACK_API_KEY