Slack Integration for Runbooks
Last updated on
Harness AI SRE integrates with Slack at the organization level, enabling automated incident communication and team collaboration across all projects.
Overview
Slack integration enables your runbooks to:
- Send automated notifications
- Create incident-specific channels
- Manage threaded discussions
- Coordinate response teams
- Track incident updates
Integration Setup
Prerequisites
- Slack Workspace Admin access
- Harness Organization Admin role
Setup Steps
- Navigate to Organization Settings → Third Party Integrations (AI SRE)
- Click Connect for Slack
- Follow the OAuth flow to authorize Harness
- Configure workspace permissions
Required Slack Permissions
The Harness Slack bot requires these permissions:
channels:manage- Create and manage channelschat:write- Send messagesgroups:write- Manage private channelsim:write- Send direct messages
Features
- Global Slack workspace access across all projects
- Unified authentication
- Centralized channel management
- Cross-project notifications
Using Slack Actions in Runbooks
When you add Slack actions to a runbook, you'll configure them through a form-based interface. The specific fields depend on the action type you select.
Send Slack Message Action
Sends a message to a specified Slack channel.
Form Fields:
- Channel: Channel name or ID (e.g.,
#incidentsor{{Activity.slack_channel}}) - Message: Message text to send
- Supports Mustache variables:
{{Activity.title}},{{Activity.summary}} - Can include Slack formatting (bold, italics, links)
- Supports Mustache variables:
Create Slack Channel Action
Creates a new Slack channel for incident coordination.
Form Fields:
- Channel Name: Name for the new channel (must follow Slack naming rules)
- Example:
incident-{{Activity.id}}
- Example:
- Description: Channel topic/description
- Is Private: Whether to create a private channel
Available Mustache Variables:
{{Activity.title}}- AI SRE incident title{{Activity.id}}- AI SRE incident ID{{Activity.severity}}- AI SRE incident severity{{Activity.status}}- AI SRE incident status- Any custom incident fields configured in your incident template
Best Practices
Channel Naming
- Use consistent prefixes
- Include incident IDs
- Keep names descriptive
- Follow workspace conventions
Message Structure
- Use clear formatting
- Include severity indicators
- Link to relevant dashboards
- Mention appropriate teams
Permissions
- Use least privilege access
- Regularly audit permissions
- Document access requirements
- Monitor usage patterns
Common Use Cases
Incident Coordination
- Create incident channel
- Notify stakeholders
- Share initial assessment
- Track response actions
Status Updates
- Send periodic updates
- Track resolution progress
- Share metrics and graphs
- Document action items
Post-Incident
- Archive incident channel
- Share incident summary
- Schedule retrospective
- Document lessons learned
Troubleshooting
Common Issues
-
Authentication Failures
- Verify OAuth tokens
- Check permission scopes
- Confirm workspace access
-
Channel Creation Errors
- Check naming conventions
- Verify channel limits
- Confirm bot permissions
-
Message Failures
- Validate channel existence
- Check message formatting
- Verify rate limits