Trigger.dev webhooks

Trigger.dev webhooks are signed JSON POST requests that Trigger.dev sends to your URL when a run fails, a deployment fails or succeeds, or an error group alert fires.

4 events covered

These pages cover the alerts Trigger.dev sends to you. To receive other services' webhooks in your tasks, see Trigger.dev's Webhooks docs, a separate feature in public beta.

How Trigger.dev webhooks work

Alert webhooks push failures and deployment results to your incident tooling as they happen, so you don't have to poll for failed runs. They cover alerts only: no webhook fires when a run starts or succeeds. Trigger.dev sends a POST to each matching webhook alert, and its code counts any 2xx as delivered.

type says which alert fired, and object holds its data: the task and run, the deployment or the error group, plus environment, organization and project. Every body also has id, created and webhookVersion. The docs show no version value and no example body. Trigger.dev's code sends v1 on run and deployment alerts and 2025-01-01 on alert.error.

Key facts

Signature header
x-trigger-signature-hmacsha256

Format: <lowercase hex>

Scheme
HMAC-SHA256
Signed material
{raw body}

The request body exactly as sent, with no timestamp or prefix added. Re-serialised JSON will not verify.

How events are identified
type field in the body
Body format
JSON

Content type: application/json.

API versioning
webhookVersion in the body
Other headers
content-type
Envelope
id, created, webhookVersion, type, object
Agent skill
npx skills add hookdeck/webhook-skills --skill trigger-dev-webhooks

Verify Trigger.dev webhooks →

Setting up Trigger.dev webhooks

  • In your project, click Alerts, then New alert. Choose webhook, enter your URL, pick from a run fails, a deployment fails and a deployment succeeds, then copy the secret from the Alerts page.
  • Error group alerts are created separately, from Configure alerts on the Errors page, and then appear in the same Alerts table.
  • Trigger.dev's code refuses private and loopback addresses, so test through a public URL. hookdeck listen 3000 trigger-dev --path /webhooks/trigger-dev gives you one and forwards requests to your machine.
  • Trigger.dev documents no test send or resend. Make a real run fail in a staging or preview environment, and after an outage list failed runs with the runs API.

Delivery behaviour

  1. Error group alerts go quiet

    After an error group alert fires, the group stays Unresolved and silent however often the error recurs. Add a run fails alert to hear about every failed run.

    Choose alert types →
  2. A short outage loses alerts

    Trigger.dev's code makes up to 3 attempts a few seconds apart and doesn't retry a 401, 403, 404 or 410. Keep email or Slack alerts on as a backup, and list failed runs from its API after an outage.

    Handle retries →
  3. Retried error alerts get a new id

    alert.error gets a new id on each attempt, so deduplicating on id misses its retries. Key on object.error.fingerprint, object.classification and object.error.lastSeen instead.

    Handle duplicates →
  4. The SDK rejects types it doesn't know

    webhooks.constructEvent checks the body against a fixed list of alert types and throws WebhookError on anything else. Keep the SDK current, or verify by hand if you need to accept unknown types.

    Other Trigger.dev limits →

Trigger.dev webhook best practices

  • Verify every signature. Check x-trigger-signature-hmacsha256 against the raw body. Without it, anyone who finds your URL can send a fake alert and page your team.
  • Return a 2xx within 5 seconds. Store the alert and respond before you open a ticket or post to chat, so a slow handler doesn't use up one of its 3 attempts.
  • Use the right deduplication key. id repeats across retries on run and deployment alerts. On alert.error it changes, so key on object.error.fingerprint, object.classification and object.error.lastSeen.
  • Keep a second alert channel. Keep email or Slack alerts on for what matters most, since a webhook gets only 3 attempts and no documented resend.
  • Pair run fails with error group alerts. A run fails alert covers every failed run. An error group alert tells you when something new breaks, then stays quiet.
  • Route by environment. Use object.environment.type to treat PRODUCTION differently from STAGING and PREVIEW. alert.error has only the environment's id and name.

Common Trigger.dev webhook events

Runs and errors

alert.run.failed Run fails after exhausting its retries
alert.error Error group is new, regresses or breaches its ignore condition

Deployments

alert.deployment.failed Deployment fails, with its error name and message
alert.deployment.success Deployment completes, listing its deployed tasks

Events by resource

Resource Events Payloads
alert

alert.run.failed · .deployment.success · .deployment.failed · .error

4 0

All 4 events →

In this hub

Webhook events → Every covered Trigger.dev event, with payloads where the registry has them.
MCP events → How an agent subscribes to Trigger.dev events as MCP events.
Verify signatures → Signature facts, verification code and common failures.
Production guide → Production problems, such as timeouts and retries, and how to handle them.
Agent skill → Install the webhook skill in your coding agent. npx skills add hookdeck/webhook-skills --skill trigger-dev-webhooks

Keep a short outage from losing your Trigger.dev alerts.

Hookdeck Event Gateway verifies the signature and accepts each alert as soon as it arrives, then queues it and retries to your service on your schedule.

Not affiliated with Trigger.dev. Facts are compiled from public sources and linked inline.