First things first, setup a slack app as mentioned in this guide. Following are the major steps involved:
- Create a slack app. Visit https://api.slack.com/apps.
- Configure request URL for interactive components. Click here for details.
- Configure slash commands. For more details click here.
- Enable event subscriptions. For more details click here.
- Add scopes chat:write, chat:write:public, commands and files:read to the bot token scopes. Know more about Slack Scopes.
- Then install the app to your workspace.
Keep a note of your App ID and Signing Secret from the "Basic Information" section of your app. Also note the Bot User OAuth Token from the "OAuth & Permissions" section of your app. These details will be required to setup the environment variables.