1
Create the Slack app
- Go to api.slack.com/apps and click Create New App
- Enable Socket Mode and generate an App-Level Token (
xapp-) - Add bot scopes:
chat:write,app_mentions:read,channels:history,im:history - Subscribe to events:
message.im,app_mention - Install the app and copy the Bot Token (
xoxb-)
2
Create the agent
slack_bot.py
3
Install dependencies
4
Set environment variables
5
Run
/ask for slash commands.