Heroku build failed notifications on your phone.

Get a High-priority push notification when a Heroku build fails, with a button to the build log, and optionally a quiet one when it succeeds.

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 api:build.

STEP 03

Get a push on your phone

With the text, sound and buttons from the recipe.

Setup

How to set up the Heroku api:build 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 api:build event type.https://••••••••/•••••••• your personal URL, shown after install
  4. Save. Each app needs its own webhook.
  5. Subscribe the webhook to the **`api:build`** entity. In the Dashboard that's **More → View webhooks** on your app; with the Heroku CLI:
  6. ```
  7. heroku webhooks:add -i api:build -l notify -u your webhook URL -a your-app
  8. ```
  9. Only failed builds push by default. Add `?all=1` to the URL to also get a quiet push when a build succeeds:
  10. ```
  11. your webhook URL?all=1
  12. ```
  13. 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 → api:build (build failed)
2// Fires when a Heroku app webhook subscribed to api:build reports a finished build.
3// Only failed builds push, unless the webhook URL has ?all=1.
4// Docs: https://devcenter.heroku.com/articles/webhook-events#api-build
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 build events.
17 if (body.resource !== "build" && include !== "api:build") {
18 console.log(`Ignoring Heroku "${include ?? body.resource ?? "unknown"}" event`)
19 return null
20 }
21
22 // ?all=1 on the webhook URL also sends a quiet push for successful builds.
23 const all = ["1", "true", "yes"].includes(String(request.query?.all ?? "").toLowerCase())
24 const failed = data.status === "failed"
25 if (!failed && !(all && data.status === "succeeded")) {
26 console.log(`Skipping build with status "${data.status ?? "none"}"`)
27 return null
28 }
29
30 const app = typeof data.app?.name === "string" && data.app.name ? data.app.name : null
31 // source_blob.version is usually the Git commit SHA; show it short.
32 const version = typeof data.source_blob?.version === "string" ? data.source_blob.version : ""
33 const commit = /^[0-9a-f]{12,}$/i.test(version) ? version.slice(0, 7) : version
34 const who = data.user?.email ?? body.actor?.email
35 const message = [commit, who].filter((part) => typeof part === "string" && part).join(" · ")
36 const url = app && typeof data.id === "string"
37 ? `https://dashboard.heroku.com/apps/${encodeURIComponent(app)}/activity/builds/${encodeURIComponent(data.id)}`
38 : null
39
40 return {
41 title: failed ? `❌ ${app ?? "Your app"} build failed` : `✅ ${app ?? "Your app"} built`,
42 message: message || (failed ? "The build failed" : "The build succeeded"),
43 topic: "Heroku",
44 priority: failed ? 1 : -1, // High for a broken build, Low for the optional success pushes
45 buttons: link(url, "View build log"),
46 }
47}
Payload

The Heroku api:build webhook

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

api:build · sample.json
1{
2 "id": "498b59ef-6791-4216-8000-8dc7b7e5e6fa",
3 "data": {
4 "id": "d1315ea5-4885-4288-bc99-a470a005bbcc",
5 "app": {
6 "id": "7c9e1f74-ad2c-4daf-91e5-f07bb7cafe90",
7 "name": "acme-api"
8 },
9 "slug": null,
10 "user": {
11 "id": "7c1e3b25-40a1-416f-91a9-7cd01e517a28",
12 "email": "[email protected]"
13 },
14 "stack": "heroku-24",
15 "status": "failed",
16 "release": null,
17 "buildpacks": [
18 {
19 "url": "heroku/nodejs"
20 }
21 ],
22 "created_at": "2026-09-29T07:51:37Z",
23 "updated_at": "2026-09-29T07:52:58Z",
24 "source_blob": {
25 "url": "https://example.com/source.tgz",
26 "version": "3f2a1bc9e7d84c5a9b0e6f1d2c3b4a5968778695",
27 "checksum": null
28 },
29 "output_stream_url": "https://build-output.heroku.com/streams/01234567-89ab-cdef-0123-456789abcdef"
30 },
31 "actor": {
32 "id": "7c1e3b25-40a1-416f-91a9-7cd01e517a28",
33 "email": "[email protected]"
34 },
35 "action": "update",
36 "version": "application/vnd.heroku+json; version=3",
37 "resource": "build",
38 "sequence": null,
39 "created_at": "2026-09-29T07:51:37+00:00",
40 "updated_at": "2026-09-29T07:52:58+00:00",
41 "published_at": "2026-09-29T07:52:58Z",
42 "previous_data": [],
43 "webhook_metadata": {
44 "event": {
45 "id": "498b59ef-6791-4216-8000-8dc7b7e5e6fa",
46 "include": "api:build"
47 },
48 "attempt": {
49 "id": "8a44f820-2354-489d-9a11-a793cbf49979"
50 },
51 "webhook": {
52 "id": "b54e6a7e-d162-4bd7-ab42-1011582c19cc"
53 },
54 "delivery": {
55 "id": "d244009a-670f-4340-88e9-789a4f9002d5"
56 }
57 }
58}
FAQ

Heroku build failed 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.