Head over to https://api.slack.com/apps and create your new Slack App.
There is no right order to do this. If you know what your future Heroku instance will be named, you can progress this guide step-by-step.
Let's assume your Heroku instance will hold the name slackboot
.
-
Enable Incoming Webhooks
-
Enable Interactive Components
The Request-URL will behttps://slackboot.herokuapp.com/interactive-components
-
Adding Slash Commands:
Create a new Slash Command with these parameters:- Command:
/rock-paper-scissors
- Request URL:
https://slackboot.herokuapp.com/commands
- Short Description:
Play Rock Paper Scissors
- Usage Hint:
optional
- Command:
-
Adding a Bot User:
You can chose whatever you like for the Display name and default name. -
OAuth & Permissions - adding a Redirect URL & Managing Scopes:
This step is important since you have to install the App in order to get a Team-ID that is needed to use the Slack App (for authentication purposes). In our case, since we chose
slackboot
as a name, our Redirect URL will behttps://slackboot.herokuapp.com/installation
.In the same menu, add the following Permission Scopes:
- chat:write:bot
- incoming-webhook
Now hit Install App to Workspace
and you will get the following (sensitive) information about your Slack App:
- The OAuth Token
- The Client-ID
- The Client-Secret
- The Signing-Secret
Since you will be prompted to enter these while deploying on Heroku. Additionally you’ll need to have the following settings in your Slack-App Configuration:
- Event Subscriptions: channel.message
- Slash Commands: /rock-paper-scissors with {ngrok_host}/commands
- OAuth Scope: channels:read and channels:write
After the preparations are made, you can deploy your App on Heroku.
After deploying, go to https://api.slack.com/apps - select your app - go to Manage Distribution and hit Add to Slack
to finalize your installation.
Feel free to join our Discord - We are happy to help!