Incident Alerting & On-Call

When something breaks, get a DM (or a call) with a clear summary

This use case sets up incident alerting with OpenClaw: when Sentry fires, a GitHub check fails, a health endpoint goes down, or any webhook sends an alert, the agent receives the payload, summarizes it, and sends you a DM (or triggers a voice call). You get one concise message instead of raw JSON. Plan for about 25 minutes.

What You Will Build

  • A webhook endpoint that accepts POSTs from Sentry, GitHub, or your own monitor
  • An agent command that turns the payload into a short, readable summary
  • Delivery to your channel (Slack, Telegram, etc.) or optional outbound call
  • Optional: only alert when severity is high, or throttle to avoid spam

Prerequisites

  • OpenClaw installed and runningGetting Started
  • At least one channel connectedChannel Setup
  • Webhook source — Sentry, GitHub Actions, a health-check service, or any HTTP POST that can hit your Gateway (often via a reverse proxy). See Automation for webhook config and auth.

Step 1: Expose a Webhook (Secure It)

Configure a webhook in your OpenClaw config so the Gateway accepts POSTs at a path (e.g. /webhook/sentry). Always secure webhooks: use a secret header or signature, bind the Gateway to localhost, and put a reverse proxy (Caddy, nginx) with TLS and auth in front if the trigger is from the internet. Exact schema: Automation Reference.

Step 2: Map Payload to Agent Message

The webhook should run the agent with the incoming payload so it can summarize. Example idea:

Webhook runs agent with payload
{
  "webhooks": {
    "endpoints": [
      {
        "path": "/webhook/sentry",
        "command": "agent --message 'INCIDENT: A Sentry alert fired. Payload: {{body}}. Summarize: what failed, where, severity. Reply in 2-3 sentences and send to my channel.'"
      }
    ]
  }
}

Replace {{body}} with the actual variable your config uses for the request body. The agent will see the payload and reply to your default channel (or the channel you configure).

Step 3: Point Sentry (or GitHub, etc.) at the Webhook

In Sentry: Project → Settings → Webhooks → add your endpoint URL (e.g. https://your-domain/webhook/sentry). Use the same secret in Sentry and in your reverse proxy so only Sentry can trigger it. For GitHub Actions or other sources, add the webhook URL in that service’s settings and use the same security pattern.

Step 4: Optional — Voice Call for Critical Alerts

For P0 or after-hours critical alerts, trigger an outbound voice call instead of (or in addition to) a DM: the same webhook runs a command that starts a call with a short summary. Configure in your automation so only high-severity events trigger a call.

Related Tutorials

Setting Up Automation — Cron and webhooks. Advanced Automation — Webhooks, error handling. Automation Reference — Full webhook options. Outbound voice calls — Agent calls you.