To set up the Slack integration you need a Slack workspace where you have admin or App Manager permissions, and a StackFlow account with super_admin or itsm_manager role.
Select From scratch, name it StackFlow, and select your workspace
Under Basic Information, note the App ID and Signing Secret
Upload the StackFlow logo as the app icon (optional but recommended)
Step 2: Configure OAuth Scopes
In the Slack App settings, navigate to OAuth & Permissions
Under Bot Token Scopes, add the following scopes:
Scope
Purpose
channels:read
List channels to select notification targets
chat:write
Post incident notifications to channels
chat:write.public
Post to channels the bot hasn't joined
commands
Handle slash commands (/incident, /stackflow)
im:write
Send direct messages for approval requests
users:read
Resolve Slack user to StackFlow account
users:read.email
Match Slack users to StackFlow users by email
Click Install App to Workspace and authorize
Copy the Bot User OAuth Token (starts with xoxb-)
Step 3: Set Up Incoming Webhook
Navigate to Incoming Webhooks in the Slack app settings
Enable Activate Incoming Webhooks
Click Add New Webhook to Workspace and select your #incidents channel
Copy the webhook URL (format: https://hooks.slack.com/services/T.../B.../...)
Multiple Channels: You can create multiple Incoming Webhooks for different channels. In StackFlow, map each P1-P4 priority to a different Slack channel (e.g., #incidents-critical for P1, #incidents-high for P2).
Step 4: Configure Slash Commands
In the Slack App, go to Slash Commands → Create New Command
Create the /incident command with Request URL: https://your-instance.stackflow-tech.com/prod/api/webhooks/slack/commands
Create the /stackflow command with the same Request URL
Enable Escape channels, users, and links for both commands
Step 5: Connect in StackFlow
Navigate to Admin → Integration Hub → Slack → Configure
Paste the Bot User OAuth Token (xoxb-...) into the Bot Token field
Paste the Incoming Webhook URL for each priority channel
Paste the Signing Secret for slash command verification
Click Save & Test Connection
# StackFlow stores the bot token in Secrets Manager:
aws secretsmanager get-secret-value --secret-id stackflow/integrations/slack/bot-token --region us-east-1
Incident Alert Templates
StackFlow posts Slack Block Kit messages for incident notifications. Customize templates in Admin → Integration Hub → Slack → Templates: