Skip to content
Planekeeper is currently in alpha development. Features and APIs may change. Feedback is welcome!
Request early access to get started.

Send notifications to Slack

This recipe configures Planekeeper to send alert notifications to a Slack channel. Slack supports both simple text messages and rich Block Kit formatting through incoming webhooks.


Prerequisites

  • A running Planekeeper instance with at least one alert config
  • A Slack workspace where you can create apps

Step 1: Create a Slack incoming webhook

  1. Go to api.slack.com/apps and click Create New App
  2. Choose From scratch, name it Planekeeper, and select your workspace
  3. Go to Incoming Webhooks and toggle it On
  4. Click Add New Webhook to Workspace
  5. Select the channel where you want notifications
  6. Copy the webhook URL

The URL looks like: https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX


Step 2: Create a notification channel in Planekeeper

  1. Navigate to Notification Channels in the sidebar
  2. Click Create Channel
  3. Fill in the fields:
Field Value
Name Slack Alerts
Channel Type webhook
URL Paste your Slack webhook URL
  1. Check Use Event-Specific Templates
  2. Add the templates from step 3 below
  3. Click Create

Step 3: Add Slack templates

Choose either simple text templates or Block Kit templates depending on how much formatting you want.

New alert template

New Alert / Escalated
{"text": ":rotating_light: *{{.Alert.Severity | upper}}*: {{.Alert.ConfigName}}\nArtifact: {{.Alert.ArtifactName}}\nVersion {{.Alert.DiscoveredVersion}} is {{.Alert.BehindBy}} behind latest ({{.Alert.LatestVersion}})\n<{{.AcknowledgeURL}}|Click to Acknowledge>"}

Acknowledged template

Acknowledged / Unacknowledged
{"text": "{{if .IsAcknowledged}}:white_check_mark: *Acknowledged*{{else}}:arrows_counterclockwise: *Unacknowledged*{{end}}: {{.Alert.ConfigName}} - {{.Alert.ArtifactName}}{{if .IsAcknowledged}}\nAcknowledged by {{.AcknowledgedBy}}{{end}}"}

Resolved template

Resolved
{"text": ":tada: *Resolved*: {{.Alert.ConfigName}} - {{.Alert.ArtifactName}}\nThe alert has been automatically resolved."}

New alert template

New Alert / Escalated (Block Kit)
{"blocks": [{"type": "header", "text": {"type": "plain_text", "text": "{{.Alert.Severity | upper}} Alert"}}, {"type": "section", "fields": [{"type": "mrkdwn", "text": "*Config:*\n{{.Alert.ConfigName}}"}, {"type": "mrkdwn", "text": "*Artifact:*\n{{.Alert.ArtifactName}}"}, {"type": "mrkdwn", "text": "*Current:*\n{{.Alert.DiscoveredVersion}}"}, {"type": "mrkdwn", "text": "*Latest:*\n{{.Alert.LatestVersion}}"}]}, {"type": "actions", "elements": [{"type": "button", "text": {"type": "plain_text", "text": "Acknowledge"}, "url": "{{.AcknowledgeURL}}", "style": "primary"}]}]}

Acknowledged template

Acknowledged / Unacknowledged (Block Kit)
{"blocks": [{"type": "section", "text": {"type": "mrkdwn", "text": "{{if .IsAcknowledged}}:white_check_mark: *Acknowledged*: {{.Alert.ConfigName}}\nBy {{.AcknowledgedBy}}{{else}}:arrows_counterclockwise: *Unacknowledged*: {{.Alert.ConfigName}}{{end}}"}}]}

Resolved template

Resolved (Block Kit)
{"blocks": [{"type": "section", "text": {"type": "mrkdwn", "text": ":tada: *Resolved*: {{.Alert.ConfigName}} - {{.Alert.ArtifactName}}\nThe alert has been automatically resolved."}}]}

Step 4: Test the channel

  1. Go to Notification Channels and find Slack Alerts
  2. Click Test
  3. Check your Slack channel for the test message
  4. If the test fails, verify:
    • The webhook URL is correct
    • The Slack app is still installed in your workspace
    • The target channel still exists

Step 5: Create a notification rule

  1. Navigate to Notification Rules in the sidebar
  2. Click Create Rule
  3. Fill in the fields:
Field Value
Name All Alerts to Slack
Channel Select Slack Alerts
Severity Filter Leave empty (matches all severities)
Event Filter Leave empty (matches all events)
  1. Click Create

Routing different severities to different channels

Create separate Slack channels and notification rules for different severity levels:

Notification rule Severity filter Slack channel
Critical to Pager Channel critical #ops-critical
High to Alerts Channel high #ops-alerts
Moderate to Info Channel moderate #ops-info

This requires creating three notification channels in Planekeeper (one per Slack channel) and three notification rules with different severity filters.

Use Block Kit for critical alerts

Block Kit formatting with the acknowledge button is especially useful for critical alerts where you want one-click acknowledgment directly from Slack.