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.
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
{raw body} The request body exactly as sent, with no timestamp or prefix added. Re-serialised JSON will not verify.
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-devgives 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
5 seconds in Trigger.dev's delivery code; its docs don't state one Retries up to 3 attempts a few seconds apart, in its worker config; 401, 403, 404 and 410 aren't retried After retries no resend none is documented, so list failed runs from the API after an outage Duplicates possible a retry can repeat an alert you handled, and alert.error gets a new id each attempt Known failure modes
From Hookdeck's Trigger.dev guide →-
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 → -
A short outage loses alerts
Trigger.dev's code makes up to 3 attempts a few seconds apart and doesn't retry a
Handle retries →401,403,404or410. Keep email or Slack alerts on as a backup, and list failed runs from its API after an outage. -
Retried error alerts get a new id
Handle duplicates →alert.errorgets a newidon each attempt, so deduplicating onidmisses its retries. Key onobject.error.fingerprint,object.classificationandobject.error.lastSeeninstead. -
The SDK rejects types it doesn't know
Other Trigger.dev limits →webhooks.constructEventchecks the body against a fixed list of alert types and throwsWebhookErroron anything else. Keep the SDK current, or verify by hand if you need to accept unknown types.
Trigger.dev webhook best practices
- Verify every signature.
Check
x-trigger-signature-hmacsha256against 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.
idrepeats across retries on run and deployment alerts. Onalert.errorit changes, so key onobject.error.fingerprint,object.classificationandobject.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.typeto treatPRODUCTIONdifferently fromSTAGINGandPREVIEW.alert.errorhas only the environment'sidandname.
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 | 4 | 0 |
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.