Skip to main content

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

  1. Go to api.slack.com/apps
  2. Click Create New AppFrom scratch
  3. Name it FireBackup and select your workspace
  4. Navigate to Incoming Webhooks and enable them
  5. Click Add New Webhook to Workspace
  6. Select your notification channel
  7. Copy the webhook URL

2. Add to FireBackup

  1. In FireBackup, go to SettingsWebhooks
  2. Click Add Webhook
  3. Select Slack as the type
  4. Paste your webhook URL
  5. Select events to monitor
  6. Click Save
Quick Setup

For a detailed step-by-step guide with screenshots, see the Slack Webhooks Tutorial.


Configuration Options

Basic Configuration

FieldRequiredDescription
NameYesDisplay name for the webhook
URLYesSlack webhook URL
TypeYesSet to slack
EventsYesEvents to trigger notifications
EnabledNoEnable/disable the webhook

Event Types

Subscribe to these events:

EventDescription
backup.startedBackup job initiated
backup.completedBackup finished successfully
backup.failedBackup encountered an error
restore.startedRestore operation initiated
restore.completedRestore finished successfully
restore.failedRestore encountered an error
pitr.enabledPITR enabled for a project
pitr.disabledPITR disabled for a project
schedule.createdNew backup schedule created
schedule.updatedBackup schedule modified
schedule.deletedBackup schedule removed
schedule.failedScheduled backup didn't run
storage.connectedNew storage destination added
storage.errorStorage 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

FieldValue
ProjectProduction App
TypeFull Backup
Size125.4 MB
Duration4m 32s
StorageAWS S3 (us-east-1)

[View Details] [View in Dashboard]

Failed Backup:

🔴 Backup Failed

FieldValue
ProjectProduction App
ErrorAuthentication failed
Retry1 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:

VariableDescription
{{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:

  1. Create a workflow in Slack Workflow Builder

  2. Start with "Webhook" trigger

  3. Define variables:

    • project_name (text)
    • backup_status (text)
    • backup_size (text)
    • error_message (text)
  4. Add workflow steps:

    • Send message to channel
    • Conditional: If backup_status is "failed", mention on-call
    • Create incident ticket (optional)
  5. 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

  1. Verify webhook URL is correct and active
  2. Check channel permissions - bot must be in the channel
  3. 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:

  1. Go to your Slack app settings
  2. Regenerate the webhook URL
  3. 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.