Request icon
Log icon
SquadcastIncomingWebhook icon

Page Squadcast On-Call When a Critical Flow Fails

Page Squadcast on-call when a critical Kestra flow fails. The errors block opens a P1 incident with event id and tags instead of a chat message nobody reads.

Categories
BusinessInfrastructure

Most teams wire flow failures to a Slack channel, and most incidents start with someone admitting they saw the message and kept scrolling. This blueprint replaces that pattern with a real page. The main tasks do the critical work, here a core.http.Request against an endpoint your business process depends on, and the errors block fires io.kestra.plugin.squadcast.SquadcastIncomingWebhook to open a P1 incident in Squadcast. On-call gets paged, the incident carries the flow, execution, and severity as tags, and the execution id doubles as the event id so the incident can later be resolved programmatically.

How it works

  1. call_critical_service (io.kestra.plugin.core.http.Request) performs the monitored work against the endpoint_url input. In your version, this is the extract, load, or sync that must not fail silently.
  2. On success, record_success writes a single log line. Healthy runs produce no notifications at all, which keeps the pager trustworthy.
  3. On any task failure, the errors block runs page_on_call (io.kestra.plugin.squadcast.SquadcastIncomingWebhook). It sends message, priority: P1, status: trigger, key-value tags, and eventId set to {{ execution.id }}.
  4. Squadcast routes the incident through your escalation policy, so the failure is acknowledged by a person, not archived by a channel.

What you get

  • A page with teeth, Squadcast escalates until a human acknowledges, unlike a chat message.
  • An event id tied to the execution, so a follow-up call with status: resolve and the same event id closes exactly this incident.
  • Tags carrying flow, execution, and severity, giving on-call context before opening Kestra.
  • A quiet success path, notifications only exist when something is actually broken.

Who it's for

  • Platform teams whose failure alerts currently land in a muted Slack channel.
  • On-call engineers who want incidents with priority, ownership, and escalation instead of chat scrollback.
  • Anyone wrapping a business-critical pipeline that must page a person when it breaks.

Why orchestrate this with Kestra

Kestra's errors block gives every flow a guaranteed failure path, no wrapper scripts or try-except blocks around each task. The Squadcast plugin turns that path into a first-class incident with priority and event correlation, and the execution history keeps a complete record of what failed, when, and what the pager was told.

Prerequisites

  • A Squadcast account with an Incoming Webhook (API) integration on the target service.
  • The webhook URL stored as a Kestra secret.

Secrets

  • SQUADCAST_WEBHOOK_URL: the full Squadcast incoming webhook endpoint, including its token.

Quick start

  1. Add the SQUADCAST_WEBHOOK_URL secret to your namespace.
  2. Execute the flow with the default input and confirm the success log line appears with no incident.
  3. Execute again with endpoint_url set to an unreachable URL and confirm a P1 incident opens in Squadcast with the execution id as its event id.
  4. Replace call_critical_service with your real critical tasks.

How to extend

  • Add io.kestra.plugin.squadcast.SquadcastExecution after the page to attach full execution context, as shown in the execution context notifier blueprint.
  • Auto-resolve the incident when a rerun succeeds by sending status: resolve with the same event id, as shown in the incident resolve sync blueprint.
  • Set priority from an input to page P1 for production namespaces and P3 for staging.
  • Add retries on the critical task so transient failures never page anyone.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.