Slack Integration
Integrate FireBackup with Slack to receive real-time notifications about backup events, restore operations, and system alerts directly in your team's Slack channels.
Overview
The Slack integration enables:
- Real-time notifications for backup success and failure
- Rich message formatting with Block Kit
- Customizable alerts by event type, severity, and project
- Interactive buttons for quick actions
- Thread-based updates for related events
Quick Start
1. Create a Slack App
- Go to api.slack.com/apps
- Click Create New App → From scratch
- Name it
FireBackupand select your workspace - Navigate to Incoming Webhooks and enable them
- Click Add New Webhook to Workspace
- Select your notification channel
- Copy the webhook URL
2. Add to FireBackup
- In FireBackup, go to Settings → Webhooks
- Click Add Webhook
- Select Slack as the type
- Paste your webhook URL
- Select events to monitor
- Click Save
For a detailed step-by-step guide with screenshots, see the Slack Webhooks Tutorial.
Configuration Options
Basic Configuration
| Field | Required | Description |
|---|---|---|
| Name | Yes | Display name for the webhook |
| URL | Yes | Slack webhook URL |
| Type | Yes | Set to slack |
| Events | Yes | Events to trigger notifications |
| Enabled | No | Enable/disable the webhook |
Event Types
Subscribe to these events:
| Event | Description |
|---|---|
backup.started | Backup job initiated |
backup.completed | Backup finished successfully |
backup.failed | Backup encountered an error |
restore.started | Restore operation initiated |
restore.completed | Restore finished successfully |
restore.failed | Restore encountered an error |
pitr.enabled | PITR enabled for a project |
pitr.disabled | PITR disabled for a project |
schedule.created | New backup schedule created |
schedule.updated | Backup schedule modified |
schedule.deleted | Backup schedule removed |
schedule.failed | Scheduled backup didn't run |
storage.connected | New storage destination added |
storage.error | Storage connectivity issue |
Filters
Filter notifications by:
{
"filters": {
"projects": ["proj_production", "proj_staging"],
"severity": ["error", "critical"],
"trigger": ["scheduled"]
}
}
Message Formats
Default Messages
FireBackup sends rich Slack messages using Block Kit:
Successful Backup:
✅ Backup Completed Successfully
Field Value Project Production App Type Full Backup Size 125.4 MB Duration 4m 32s Storage AWS S3 (us-east-1) [View Details] [View in Dashboard]
Failed Backup:
🔴 Backup Failed
Field Value Project Production App Error Authentication failed Retry 1 of 3 Failed at 2024-01-15 10:30 UTC
[View Logs] [Retry Now]
Custom Templates
Customize message templates via API:
curl -X PATCH https://api.firebackup.io/api/v1/webhooks/whk_abc123 \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"messageTemplates": {
"backup.completed": {
"text": "✅ Backup completed for {{project.name}}",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "✅ *{{project.name}}* backup completed\n• Size: {{backup.size}}\n• Duration: {{backup.duration}}"
}
}
]
}
}
}'
Template Variables
Available variables for templates:
| Variable | Description |
|---|---|
{{project.id}} | Project ID |
{{project.name}} | Project name |
{{backup.id}} | Backup ID |
{{backup.type}} | Backup type (full/incremental) |
{{backup.size}} | Human-readable size |
{{backup.sizeBytes}} | Size in bytes |
{{backup.duration}} | Human-readable duration |
{{backup.durationMs}} | Duration in milliseconds |
{{backup.status}} | Backup status |
{{backup.url}} | Link to backup in dashboard |
{{storage.name}} | Storage destination name |
{{storage.type}} | Storage type (s3/gcs/spaces) |
{{error.message}} | Error message (for failures) |
{{error.code}} | Error code (for failures) |
{{timestamp}} | Event timestamp |
{{organization.name}} | Organization name |
Multiple Channels
Routing by Severity
Create separate webhooks for different channels:
# All notifications to #backups
curl -X POST https://api.firebackup.io/api/v1/webhooks \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"name": "Slack - All Events",
"url": "https://hooks.slack.com/services/T.../B.../xxx",
"type": "slack",
"events": ["*"]
}'
# Failures only to #alerts
curl -X POST https://api.firebackup.io/api/v1/webhooks \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"name": "Slack - Failures",
"url": "https://hooks.slack.com/services/T.../B.../yyy",
"type": "slack",
"events": ["backup.failed", "restore.failed", "schedule.failed"]
}'
Routing by Project
# Production only
curl -X POST https://api.firebackup.io/api/v1/webhooks \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"name": "Slack - Production",
"url": "https://hooks.slack.com/services/T.../B.../zzz",
"type": "slack",
"events": ["backup.completed", "backup.failed"],
"filters": {
"projects": ["proj_production"]
}
}'
Slack Workflow Integration
Using Workflow Builder
Connect FireBackup to Slack Workflow Builder for advanced automation:
-
Create a workflow in Slack Workflow Builder
-
Start with "Webhook" trigger
-
Define variables:
project_name(text)backup_status(text)backup_size(text)error_message(text)
-
Add workflow steps:
- Send message to channel
- Conditional: If
backup_statusis "failed", mention on-call - Create incident ticket (optional)
-
Configure FireBackup webhook to use workflow URL:
curl -X PATCH https://api.firebackup.io/api/v1/webhooks/whk_abc123 \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"url": "https://hooks.slack.com/workflows/T.../A.../xxx",
"type": "slack_workflow",
"payloadFormat": {
"project_name": "{{project.name}}",
"backup_status": "{{backup.status}}",
"backup_size": "{{backup.size}}",
"error_message": "{{error.message}}"
}
}'
Troubleshooting
Messages Not Appearing
- Verify webhook URL is correct and active
- Check channel permissions - bot must be in the channel
- Review delivery history:
curl -X GET https://api.firebackup.io/api/v1/webhooks/whk_abc123/deliveries \
-H "Authorization: Bearer YOUR_API_KEY"
Rate Limiting
Slack limits messages to 1 per second per webhook. For high-volume scenarios:
- Use multiple webhooks for different event types
- Enable message batching in FireBackup settings
- Consider using Slack's Events API for higher limits
Invalid Webhook URL
If Slack returns 404 or invalid_token:
- Go to your Slack app settings
- Regenerate the webhook URL
- Update the URL in FireBackup
Security
Best Practices
- Keep webhook URLs secret - treat like passwords
- Use private channels for sensitive notifications
- Rotate webhook URLs periodically
- Monitor delivery logs for unusual activity
IP Allowlisting
FireBackup sends webhooks from these IP ranges:
35.192.0.0/12
34.96.0.0/12
Configure Slack's firewall rules if using Slack Enterprise Grid.
Related
- Slack Webhooks Tutorial - Step-by-step setup guide
- Webhooks Integration - Generic webhook documentation
- Webhooks API Reference - API documentation