Step 1: Create a Slack App
- Go to api.slack.com/apps
- Click Create New App → From scratch
- Give your app a name and select your workspace
Step 2: Enable Socket Mode
- In the sidebar, go to Socket Mode
- Toggle Enable Socket Mode on
- Generate an App-Level Token with the
connections:writescope - Copy the token, it starts with
xapp-
Step 3: Configure Bot Permissions
- Go to OAuth & Permissions
- Under Bot Token Scopes, add:
chat:writecommandsim:historyim:readim:write
- Under User Token Scopes, add:
identity.basic
- Under Redirect URLs, add:
- Click Install App to Workspace (or Reinstall if already installed)
- Copy the Bot User OAuth Token (starts with
xoxb-) - Copy the Client ID and Client Secret from Basic Information
- Copy the Signing Secret from Basic Information
Step 4: Register Slash Commands
Go to Slash Commands and create each command in the Commands Reference. Leave the Request URL blank.Step 5: Configure Environment Variables
Inapps/bots/.env:
apps/api/.env:

