Slack
How to build a Slack App
Steps to create a new app:
- Open Slack API.
- Click "Create New App" and "From Scratch".
- Generate an App-Level Token with the
connections:writescope. - Enable Socket Mode.
- Enable Events
- Subscribe to bot events:
app_mentionandmessage.im. - Subscribe to events on behalf of users:
message.im.
- Subscribe to bot events:
- Setting OAuth & Permissions User Token Scopes:
chat:write,files:write. - Install the app to your workspace and obtain the
Bot User OAuth Token. - In the App Home section, check
Allow users to send Slash commands and messages from the messages tab. - Optionally, create a channel for publishing and note down the
Channel IDby viewing the channel details.
Configuration
After creating a new app, you will have the Bot User OAuth Token and Channel ID.
Next, place these keys in the environment or configuration file:
WAYBACK_SLACK_BOT_TOKEN: Bot User OAuth Token.WAYBACK_SLACK_CHANNEL: Channel ID for publishing (optional).WAYBACK_SLACK_HELPTEXT: Provide a help message for users to reference (optional).