Heroku dyno crashed notifications on your phone.

Get a High-priority push notification when a dyno of your Heroku app crashes, with its exit status.

How it works

Three steps to your first push

STEP 01

Install the recipe

One click in Studio gives you a personal webhook URL.

STEP 02

Paste your URL into Heroku

Add it as a webhook for dyno.

STEP 03

Get a push on your phone

With the text, sound and buttons from the recipe.

Setup

How to set up the Heroku dyno webhook

  1. Click Install in Studio and sign in. The recipe is added to your account and you get a personal webhook URL.
  2. In the Heroku Dashboard, open your app and choose More > View webhooks, then create a webhook. Or use the CLI command in the setup notes below.
  3. Paste your webhook URL as the URL and subscribe to the dyno event type.https://••••••••/•••••••• your personal URL, shown after install
  4. Save. Each app needs its own webhook.
  5. Subscribe the webhook to the **`dyno`** entity (not `api:dyno`, which only reports new dynos). With the Heroku CLI:
  6. ```
  7. heroku webhooks:add -i dyno -l notify -u your webhook URL -a your-app
  8. ```
  9. Dyno events are in public beta at Heroku. The recipe pushes only when a dyno reaches the `crashed` state; starting, up, stopping and down stay quiet. One-off dynos (`heroku run`) often report `crashed` even when the command succeeded, so for those the recipe only pushes on a non-zero exit status.
  10. Heroku restarts crashed dynos automatically, so a crash loop sends a push per crash.
  11. Heroku signs every delivery (`Heroku-Webhook-Hmac-SHA256`), but JustPush doesn't check that signature yet, so keep your endpoint URL private.
The code

What runs when the webhook arrives

Studio calls handleRequest(request) with the incoming webhook and sends the message it returns. It's yours after install; change anything.

transform.js
1// Heroku → dyno crashed
2// Fires when a Heroku app webhook subscribed to the "dyno" entity reports a dyno in the
3// "crashed" state. Other dyno states (starting, up, stopping, down) stay quiet.
4// Docs: https://devcenter.heroku.com/articles/webhook-dyno-events
5
6// Only link to real http(s) URLs.
7function link(url, cta) {
8 return typeof url === "string" && /^https?:\/\//.test(url) ? [{ cta, url }] : []
9}
10
11function handleRequest(request) {
12 const body = request.body && typeof request.body === "object" ? request.body : {}
13 const data = body.data && typeof body.data === "object" ? body.data : {}
14 const include = body.webhook_metadata?.event?.include
15
16 // Guard: only dyno lifecycle events. (api:dyno "create" events have no state and are skipped below.)
17 if (body.resource !== "dyno" && include !== "dyno") {
18 console.log(`Ignoring Heroku "${include ?? body.resource ?? "unknown"}" event`)
19 return null
20 }
21 if (data.state !== "crashed") {
22 console.log(`Skipping dyno state "${data.state ?? "none"}"`)
23 return null
24 }
25
26 // One-off dynos (heroku run) often end as "crashed" even when the command succeeded,
27 // so for those only a non-zero exit status counts.
28 const oneOff = typeof data.management === "string" && data.management.startsWith("run:")
29 const exit = Number.isInteger(data.exit_status) ? data.exit_status : null
30 if (oneOff && !exit) {
31 console.log("Skipping a one-off dyno that exited cleanly")
32 return null
33 }
34
35 const app = typeof data.app?.name === "string" && data.app.name ? data.app.name : null
36 const type = typeof data.type === "string" && data.type ? data.type : null
37 const dyno = typeof data.name === "string" && data.name ? data.name : "The dyno"
38 const release = Number.isInteger(data.release?.version) ? `release v${data.release.version}` : null
39 const exited = exit !== null ? `${dyno} exited with status ${exit}` : `${dyno} crashed`
40
41 return {
42 title: oneOff
43 ? `⚠️ ${app ?? "Your app"} one-off dyno failed`
44 : `💥 ${app ?? "Your app"} ${type ? `${type} ` : ""}dyno crashed`,
45 message: [exited, release].filter(Boolean).join(" · "),
46 topic: "Heroku",
47 // A crashed formation dyno needs you soon (Heroku restarts it, but it may keep crashing);
48 // a failed one-off command is worth knowing.
49 priority: oneOff ? 0 : 1,
50 buttons: app ? link(`https://dashboard.heroku.com/apps/${encodeURIComponent(app)}/logs`, "View logs") : [],
51 }
52}
Payload

The Heroku dyno webhook

This is what Heroku sends to your URL for dyno. It is a sample, trimmed to the fields recipes use.

dyno · sample.json
1{
2 "id": "615fbe2a-5add-4658-93e6-a1b905d1c9a1",
3 "data": {
4 "id": "c86bee75-8523-46a7-b4d0-08663c975de8",
5 "app": {
6 "id": "7921ed93-b8b3-4437-9d13-509fcf32595c",
7 "name": "acme-api"
8 },
9 "name": "web.76bcb7fb4-552lh",
10 "size": "dyno-1c-0.5gb",
11 "type": "web",
12 "state": "crashed",
13 "command": "/cnb/process/web",
14 "release": {
15 "id": "1c462e25-e6b9-47db-b7d8-160e6a714677",
16 "version": 42
17 },
18 "management": "formation",
19 "exit_status": 2
20 },
21 "actor": {
22 "id": "1030c06a-bcbe-4738-9134-89af5c717fb1",
23 "email": "[email protected]"
24 },
25 "action": "destroy",
26 "version": "application/vnd.heroku+json; version=3",
27 "resource": "dyno",
28 "created_at": "2026-09-29T08:32:57Z",
29 "published_at": null,
30 "previous_data": [],
31 "webhook_metadata": {
32 "event": {
33 "id": "615fbe2a-5add-4658-93e6-a1b905d1c9a1",
34 "include": "dyno"
35 },
36 "attempt": {
37 "id": "92515333-3d4f-4ca9-ae43-760ec63322a4"
38 },
39 "webhook": {
40 "id": "24cb449e-864f-4aa1-bb9c-f6051d4cc500"
41 },
42 "delivery": {
43 "id": "aaa950ff-84b9-48ac-9f29-093e33c64ea6"
44 }
45 }
46}
FAQ

Heroku dyno crashed notifications: questions

Does this work on iPhone and Android?

Yes. Install the JustPush app from the App Store or Google Play and sign in. Every phone signed in to your account gets the notification.

Do I need to write code?

No. Install the recipe in Studio, paste your webhook URL into Heroku and you are done. The code is there if you want to change the text, the sound or the buttons.

Can I change what the notification says?

Yes. After install the recipe's code is yours. Edit it in Studio and test it against the sample payload before you save.

What does it cost?

JustPush is free for 30 days. After that it's $19.99 a year, or $39.99 once. There is no extra charge for recipes.

Ready when you are

Heroku on your phone in two minutes.

Install the recipe, paste one URL, done. Free for 30 days, no credit card required.