Skip to content

Webhook Alerts

Get notified on Discord, Slack, or any webhook-compatible service when something needs your attention.

Alert Types

Project Budget Alert

Fires when a project reaches 90% of its monthly budget. Helps you catch overspending before it happens.

Rate Limit Alert

Fires when your 5-hour or weekly rate limit usage exceeds 90%. Gives you time to slow down or switch machines before getting throttled.

Configuration

Configure webhooks in the dashboard under Settings → Notifications.

  1. Paste your Discord or Slack webhook URL
  2. claude-telemetry auto-detects the platform and formats messages accordingly:
    • Discord — rich embeds with color-coded severity
    • Slack — Block Kit formatted messages
    • Other — standard JSON POST payload

Anti-Spam

To avoid notification fatigue:

  • Maximum one alert per type per day — you won't get 50 budget alerts if a project stays over 90%
  • Alerts reset daily at midnight UTC
  • Each alert type (budget, rate-limit-5h, rate-limit-weekly) has its own cooldown

How It Works

A cron endpoint (POST /api/cron-check-notifications) runs every 15 minutes via Cloudflare Pages cron triggers. It:

  1. Checks all project budgets against their thresholds
  2. Checks 5-hour and weekly rate limit usage
  3. Sends webhook notifications for any threshold breaches
  4. Records sent alerts to prevent duplicates within the cooldown window

The cron endpoint is protected by a CRON_SECRET environment variable.

Setup

  1. Create a webhook URL in your Discord server or Slack workspace
  2. Open your claude-telemetry dashboard → Settings → Notifications
  3. Paste the webhook URL and save
  4. Set your Cloudflare cron secret:
    bash
    npx wrangler pages secret put CRON_SECRET

Released under the MIT License.