Skip to main content

Notification providers

Seven native channels. Plug into the stack you already use.

Email, Slack, Microsoft Teams, PagerDuty, Discord, Telegram, and generic HTTPS webhook are first-class channels with a shared CRUD surface and a Test button that dispatches a canned payload through the real provider before you save. HTTP targets use scheme allow-lists and DNS-pinned dialing, and the Slack, Discord and Teams channels are also locked to their providers' hosts. SMTP is re-resolved before send, but its TCP connection is deliberately not DNS-pinned. Project-wide channels for the team plus per-user personal channels use the same schema, so on-call handoffs do not require touching shared config.

Ships with

  • SMTP email with TLS / STARTTLS, 4-port allow-list, masked passwords on read
  • Slack incoming webhook with Block Kit formatting
  • Microsoft Teams via Adaptive Cards (classic O365 connector, Workflow webhooks, and Power Automate URLs; host-locked to Microsoft families)
  • PagerDuty native Events API v2 with severity_map per trigger and dedup keys that collapse repeats into one incident
  • Discord incoming webhook (Slack-compatible payload, auto /slack suffix)
  • Telegram bot via sendMessage with regex-validated bot_token and chat_id
  • Generic HTTPS webhook with HMAC-SHA256 signature in X-Z4J-Signature for replay-safe receivers

Highlights

  • Test endpoint dispatches through the real provider so credentials are verified before save
  • HTTP targets use SSRF checks and DNS-pinned dialing; SMTP re-checks the resolved address before connecting
  • Sensitive fields (smtp_pass, hmac_secret, bot_token, integration_key, webhook URLs, headers) masked on read; a PATCH that omits a field or echoes its mask keeps the stored value
  • Delivery log captures status, response code, and sanitized error body for every subscription send and project-channel test

Per-trigger alert routing

Page on failures. Email on retries. Post agent drops to Slack.

Every subscription pins a trigger and routes it to the channels you pick, so task.failed can page on-call through PagerDuty while agent.offline posts to Slack. PagerDuty channels also take a per-trigger severity_map (critical / error / warning / info) that sets the incident severity. Combine with priority, fnmatch task name pattern, and queue filters to narrow the firehose down to exactly what each channel should hear.

  • Triggers for task failed / succeeded / retried and agent offline; project default subscriptions set through the API also cover schedule fire failed / succeeded, schedule task failed, misfire, and schedule circuit-breaker tripped
  • PagerDuty severities critical / error / warning / info, with built-in defaults for the task and agent triggers
  • PagerDuty severity_default plus an API-configurable severity_map per task or agent trigger
  • Filter by priority (critical / high / normal / low) so a low-priority background job never wakes anyone
  • fnmatch patterns on task name (billing.*, *.deliver) and exact-match queue filters
  • Project default subscriptions act as templates new members inherit; users override their own without affecting the team
  • Defaults are tuned so most operators only paste the integration key and go
  • ReDoS-bounded matcher: a pathological task-name pattern is rejected on save and skipped at dispatch instead of pinning a worker
  • Filters evaluated before dispatch, so a muted or filtered-out subscription costs nothing

Cooldown and mute

One bad deploy posts once. Not three hundred times.

Every subscription has its own cooldown window (0 to 86400 seconds) so a flood of repeated events collapses to a single notification, and a muted_until timestamp, set through the subscriptions API, that silences it through an on-call handoff or a maintenance window. Per-user controls live alongside per-project ones, so muting your phone for the weekend does not change anyone else's pager.

  • cooldown_seconds: skip events that arrive within N seconds of the last notification the same subscription sent
  • muted_until: hard-mute until a timestamp; the subscription resumes automatically when the window expires
  • Per-user personal subscriptions with their own cooldown and mute, independent of team channels
  • PagerDuty dedup_key collapses repeat firings of (project, trigger, task_id) into one incident upstream
  • Backpressure-safe dispatch: bounded outbound concurrency (16 per event batch) keeps fan-out from stalling the WebSocket router
  • Cooldown evaluated before dispatch, so dropping costs essentially nothing
  • 256-task pending cap on the dispatch queue protects z4j under burst load
  • Per-IP rate limit on test, import, and bulk endpoints stops accidental amplification

Related

More capabilities

Ready to try z4j?