Buildkite build failing notifications on your phone.

Get an early High-priority push notification the moment a Buildkite build starts failing, while its other jobs are still running.

build.failingCI/CDBuilds & CI
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 Buildkite

Add it as a webhook for build.failing.

STEP 03

Get a push on your phone

With the text, sound and buttons from the recipe.

Setup

How to set up the Buildkite build.failing 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 Buildkite, go to Settings > Notification Services and click Add on Webhook.
  3. Enter a description and paste your webhook URL as the Webhook URL.https://••••••••/•••••••• your personal URL, shown after install
  4. Tick the build.failing event, choose which pipelines (and branches) to watch, and click Add Webhook Notification.
  5. In **Settings → Notification Services**, add a **Webhook** with the URL above and tick **build.failing**. Pick the pipelines to watch, and optionally a branch filter such as `main`.
  6. Buildkite sends `build.failing` as soon as a job fails hard (not a soft failure), while the build's other jobs keep running. It doesn't tell you when the build finally ends: add the **Build finished** recipe for that, keeping in mind that a failed build then pushes twice (once from each).
  7. Saving the webhook sends a ping, which gives a quiet **🔔 Buildkite connected** push.
  8. Buildkite sends your webhook token as `X-Buildkite-Token` (or an HMAC-SHA256 `X-Buildkite-Signature`), but JustPush doesn't check it 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// Buildkite → build.failing
2// Fires as soon as a job fails in a Buildkite build that's still running, so you hear about
3// a broken build before the rest of its jobs have finished.
4// Docs: https://buildkite.com/docs/apis/webhooks/pipelines/build-events
5
6// Header names can arrive in any case.
7function header(request, name) {
8 const headers = request.headers || {}
9 const key = Object.keys(headers).find((k) => k.toLowerCase() === name)
10 const value = key ? headers[key] : null
11 return Array.isArray(value) ? value[0] : value
12}
13
14// Treat blank or non-string values as missing.
15function text(value) {
16 if (typeof value === "number" && Number.isFinite(value)) return String(value)
17 return typeof value === "string" && value.trim() ? value.trim() : null
18}
19
20// Only link to real http(s) URLs.
21function link(url, cta) {
22 return typeof url === "string" && /^https?:\/\//.test(url) ? [{ cta, url }] : []
23}
24
25function handleRequest(request) {
26 const body = request.body && typeof request.body === "object" ? request.body : {}
27 // Buildkite sends X-Buildkite-Event, and the same name in the body's "event" field.
28 const event = header(request, "x-buildkite-event") ?? (typeof body.event === "string" ? body.event : null)
29
30 // Saving the webhook's settings sends a ping; confirm the connection quietly.
31 if (event === "ping") {
32 return {
33 title: "🔔 Buildkite connected",
34 message: `Webhook for ${text(body.organization?.name) ?? "your organization"} is working`,
35 topic: "Buildkite",
36 priority: -1,
37 }
38 }
39
40 // Guard: only build.failing.
41 const build = body.build
42 if (event !== "build.failing" || !build || typeof build !== "object") {
43 console.log(`Ignoring Buildkite "${event ?? "unknown"}" event`)
44 return null
45 }
46
47 const pipeline = text(body.pipeline?.name) ?? "Pipeline"
48 const number = text(build.number)
49 const subject = (text(build.message) ?? "").split("\n")[0]
50 const who = text(build.creator?.name)
51
52 return {
53 title: `⚠️ ${pipeline}${number ? ` #${number}` : ""} is failing`,
54 message: (text(build.branch) ?? "A build") + (subject ? ` — ${subject}` : "") + (who ? ` (${who})` : ""),
55 topic: "Buildkite",
56 priority: 1, // a job has failed hard: the build is broken and needs you soon
57 buttons: link(build.web_url, "View build"),
58 }
59}
Payload

The Buildkite build.failing webhook

This is what Buildkite sends to your URL for build.failing. It is a sample, trimmed to the fields recipes use.

build.failing · sample.json
1{
2 "build": {
3 "id": "f62a1b4d-10f9-4790-bc1c-e2c3a0c80983",
4 "env": [],
5 "url": "https://api.buildkite.com/v2/organizations/acme/pipelines/web/builds/1482",
6 "state": "failing",
7 "branch": "main",
8 "commit": "abcd0b72a1e580e90712cdd9eb26d3fb41cd09c8",
9 "number": 1482,
10 "source": "webhook",
11 "blocked": false,
12 "creator": {
13 "id": "3d3c3bf0-7d58-4afe-8fe7-b3017d5504de",
14 "name": "Jane Doe",
15 "email": "[email protected]",
16 "avatar_url": "https://www.gravatar.com/avatar/00000000000000000000000000000000",
17 "created_at": "2025-05-22T12:36:45.309Z"
18 },
19 "message": "Fix checkout totals rounding\n\nCloses #88",
20 "web_url": "https://buildkite.com/acme/web/builds/1482",
21 "meta_data": [],
22 "created_at": "2026-09-24T21:05:59.874Z",
23 "failing_at": "2026-09-24T21:07:31.204Z",
24 "graphql_id": "QnVpbGQtLS1mNjJhMWI0ZC0xMGY5LTQ3OTAtYmMxYy1lMmMzYTBjODA5ODM=",
25 "started_at": "2026-09-24T21:06:10.112Z",
26 "finished_at": null,
27 "pull_request": null,
28 "scheduled_at": "2026-09-24T21:05:59.874Z",
29 "cancel_reason": null
30 },
31 "event": "build.failing",
32 "sender": {
33 "id": "8a7693f8-dbae-4783-9137-84090fce9045",
34 "name": "Jane Doe"
35 },
36 "pipeline": {
37 "id": "849411f9-9e6d-4739-a0d8-e247088e9b52",
38 "url": "https://api.buildkite.com/v2/organizations/acme/pipelines/web",
39 "name": "Web",
40 "slug": "web",
41 "web_url": "https://buildkite.com/acme/web",
42 "repository": "[email protected]:acme/web.git",
43 "default_branch": "main"
44 }
45}
FAQ

Buildkite build failing 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 Buildkite 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

Buildkite on your phone in two minutes.

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