Slack Integration
Table of contents
- Overview
- Quick Setup (Incoming Webhooks)
- Full Slack App Setup
- Notification Configuration
- Slash Commands
- Interactive Features
- Advanced Configuration
- Troubleshooting
- Best Practices
- Integration Examples
- Related
Overview
Connect ButterStack to Slack for instant notifications about builds, asset updates, and team collaboration. This integration supports both incoming webhooks and full Slack app functionality.
Quick Setup (Incoming Webhooks)
The fastest way to get started is with incoming webhooks for basic notifications.
Step 1: Create Webhook in Slack
- Go to api.slack.com/apps
- Click Create New App β From scratch
- Name it βButterStackβ and select your workspace
- Go to Incoming Webhooks β Enable
- Click Add New Webhook to Workspace
- Select the channel for notifications
- Copy the webhook URL
Step 2: Configure in ButterStack
- Navigate to Settings β Integrations
- Click Add Integration β Slack
- Paste the webhook URL
- Select notification types:
- β Build completions
- β Asset approvals needed
- β Task assignments
- β Error alerts
Full Slack App Setup
For interactive features and slash commands, create a full Slack app.
Step 1: Create Slack App
- Visit api.slack.com/apps
- Click Create New App β From manifest
- Paste this manifest:
display_information:
name: ButterStack
description: Asset pipeline and build management
background_color: "#5D5DFF"
oauth_config:
scopes:
bot:
- channels:read
- chat:write
- commands
- users:read
settings:
interactivity:
is_enabled: true
request_url: https://app.butterstack.com/slack/interactive
event_subscriptions:
request_url: https://app.butterstack.com/slack/events
bot_events:
- app_mention
- message.channels
org_deploy_enabled: false
socket_mode_enabled: false
features:
bot_user:
display_name: ButterStack
always_online: true
slash_commands:
- command: /butterstack
url: https://app.butterstack.com/slack/commands
description: Interact with ButterStack
usage_hint: "[status|build|approve] [options]"
Step 2: Install App to Workspace
- Go to OAuth & Permissions
- Click Install to Workspace
- Review and approve permissions
- Copy the Bot User OAuth Token
Step 3: Configure OAuth in ButterStack
- In ButterStack, go to Settings β Integrations β Slack
- Switch to OAuth App mode
- Enter:
- Bot Token:
xoxb-your-token - Signing Secret: (from Basic Information)
- Default Channel:
#butterstack
- Bot Token:
Channel Naming
We recommend creating dedicated channels like #butterstack-builds, #butterstack-approvals for different notification types.
Notification Configuration
Channel Routing
Route different notifications to specific channels:
Build Success: #butterstack-builds
Build Failure: #butterstack-alerts
Asset Approval: #butterstack-approvals
Task Assignment: #butterstack-tasks
System Errors: #butterstack-critical
Message Formatting
Customize notification appearance:
Notification Templates
Configure custom templates:
{
"build_success": {
"color": "good",
"title": "β
Build #{build_number} Completed",
"fields": [
{"title": "Project", "value": "{project_name}", "short": true},
{"title": "Duration", "value": "{duration}", "short": true}
],
"actions": [
{"text": "View Build", "url": "{build_url}"},
{"text": "Download", "url": "{artifact_url}"}
]
}
}
Slash Commands
Available commands after full app setup:
/butterstack status
Check system and project status
/butterstack status [project-name]
/butterstack build
Trigger or check builds
/butterstack build start MyGame linux
/butterstack build status 123
/butterstack build list --limit 5
/butterstack approve
Approve pending assets
/butterstack approve asset-123
/butterstack approve --list
/butterstack help
Show all available commands
Command Permissions
Commands respect ButterStack user permissions. Link your Slack account in ButterStack settings.
Interactive Features
Approval Workflows
Enable direct approvals from Slack:
Build Controls
Start and manage builds:
// Triggered by: /butterstack build start MyGame linux
{
"response_type": "in_channel",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "π *Build Started*\nProject: MyGame\nPlatform: Linux"
}
},
{
"type": "actions",
"elements": [
{
"type": "button",
"text": {"type": "plain_text", "text": "Cancel Build"},
"action_id": "cancel_build",
"value": "build_123"
}
]
}
]
}
Advanced Configuration
Thread Notifications
Group related notifications in threads:
Thread Grouping:
- Build start β Updates β Completion
- Asset upload β Analysis β Approval
- Task creation β Assignment β Completion
Custom Workflows
Create Slack workflows that integrate with ButterStack:
- Use Slack Workflow Builder
- Add ButterStack webhook step
- Configure triggers:
- Message reactions
- Form submissions
- Scheduled times
Analytics Integration
Track Slack interaction metrics:
- Message delivery rates
- Interaction frequencies
- Response times
- Most used commands
Troubleshooting
Messages Not Delivering
Check these common issues:
- Webhook URL: Ensure itβs correctly copied
- Channel permissions: Bot must be invited to private channels
- Rate limits: Slack limits to 1 message/second per channel
- Network: Verify ButterStack can reach Slack (no firewall blocking)
Test with cURL:
curl -X POST -H 'Content-type: application/json' \
--data '{"text":"Test from ButterStack"}' \
YOUR_WEBHOOK_URL
Interactive Buttons Not Working
Solutions:
- Verify interactive URL is configured in Slack app
- Check signing secret matches
- Ensure HTTPS is enabled (Slack requires it)
- Verify user has permissions in ButterStack
- Check ButterStack logs for incoming requests
Slash Commands Failing
Common fixes:
- Reinstall app to workspace
- Verify command URL endpoints
- Check command is enabled in app settings
- Ensure response is within 3 seconds
- Use proper response format
Best Practices
π’ Channel Strategy
- Separate channels by notification type
- Use threads for related updates
- Set up critical alert channels
Integration Examples
Python Webhook Example
import requests
import json
def send_butterstack_notification(webhook_url, message):
payload = {
"text": "ButterStack Notification",
"attachments": [{
"color": "#5D5DFF",
"title": message['title'],
"text": message['description'],
"fields": [
{"title": "Status", "value": message['status'], "short": True},
{"title": "Time", "value": message['timestamp'], "short": True}
],
"footer": "ButterStack",
"footer_icon": "https://app.butterstack.com/icon.png"
}]
}
response = requests.post(
webhook_url,
data=json.dumps(payload),
headers={'Content-Type': 'application/json'}
)
return response.status_code == 200
Related
- Discord Integration - Multi-channel notifications for gaming communities
- Troubleshooting - Common issues and solutions