Buildkite build finished notifications on your phone.

Get a High-priority push notification when a Buildkite build fails, and optionally a quiet one when it passes, is canceled or waits on a block step.

build.finishedCI/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.finished.

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.finished 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.finished 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.finished**. Pick the pipelines to watch, and optionally a branch filter such as `main` so only builds on that branch push.
  6. Only failed builds push by default (High priority). Add `?all=1` to the URL to also get quiet pushes when a build passes or is canceled, and a Normal one when it stops at a block step waiting for approval:
  7. ```
  8. your webhook URL?all=1
  9. ```
  10. Want to know sooner? The **Build failing** recipe fires as soon as the first job fails, while the build is still running. If you tick both events on one webhook, a failed build pushes twice: once while failing and once when it finishes.
  11. Saving the webhook sends a ping, which gives a quiet **🔔 Buildkite connected** push.
  12. 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.finished
2// Fires when a Buildkite build finishes. Failures push by default; add ?all=1 to the webhook
3// URL to also hear about passed and canceled builds and builds waiting on a block step.
4// Docs: https://buildkite.com/docs/apis/webhooks/pipelines/build-events
5
6// Final build states, how to describe them, and whether they push without ?all=1.
7const STATES = {
8 failed: { emoji: "❌", verb: "failed", priority: 1, always: true }, // broken build: needs you soon
9 passed: { emoji: "✅", verb: "passed", priority: -1, always: false }, // good news, only with ?all=1
10 canceled: { emoji: "⏹️", verb: "was canceled", priority: -1, always: false }, // on purpose, only with ?all=1
11}
12// Skipped and not_run builds never push.
13
14// Look a key up in a table without tripping over inherited names like "toString".
15function pick(table, key, fallback) {
16 return typeof key === "string" && Object.prototype.hasOwnProperty.call(table, key) ? table[key] : fallback
17}
18
19// Header names can arrive in any case.
20function header(request, name) {
21 const headers = request.headers || {}
22 const key = Object.keys(headers).find((k) => k.toLowerCase() === name)
23 const value = key ? headers[key] : null
24 return Array.isArray(value) ? value[0] : value
25}
26
27// Treat blank or non-string values as missing.
28function text(value) {
29 if (typeof value === "number" && Number.isFinite(value)) return String(value)
30 return typeof value === "string" && value.trim() ? value.trim() : null
31}
32
33// Only link to real http(s) URLs.
34function link(url, cta) {
35 return typeof url === "string" && /^https?:\/\//.test(url) ? [{ cta, url }] : []
36}
37
38function handleRequest(request) {
39 const body = request.body && typeof request.body === "object" ? request.body : {}
40 // Buildkite sends X-Buildkite-Event, and the same name in the body's "event" field.
41 const event = header(request, "x-buildkite-event") ?? (typeof body.event === "string" ? body.event : null)
42
43 // Saving the webhook's settings sends a ping; confirm the connection quietly.
44 if (event === "ping") {
45 return {
46 title: "🔔 Buildkite connected",
47 message: `Webhook for ${text(body.organization?.name) ?? "your organization"} is working`,
48 topic: "Buildkite",
49 priority: -1,
50 }
51 }
52
53 // Guard: only build.finished.
54 const build = body.build
55 if (event !== "build.finished" || !build || typeof build !== "object") {
56 console.log(`Ignoring Buildkite "${event ?? "unknown"}" event`)
57 return null
58 }
59
60 // ?all=1 on the webhook URL also sends the quieter pushes.
61 const all = ["1", "true", "yes"].includes(String(request.query?.all ?? "").toLowerCase())
62
63 // A build that stops at a block step sends build.finished with blocked: true, and again
64 // when it really finishes. It's waiting for someone to unblock it.
65 const state = build.blocked === true && build.state !== "failed"
66 ? { emoji: "⏸️", verb: "is waiting for approval", priority: 0, always: false } // someone may need to act
67 : pick(STATES, build.state, null)
68
69 if (!state || (!state.always && !all)) {
70 console.log(`Skipping build state "${build.state ?? "unknown"}"${build.blocked ? " (blocked)" : ""}`)
71 return null
72 }
73
74 const pipeline = text(body.pipeline?.name) ?? "Pipeline"
75 const number = text(build.number)
76 const subject = (text(build.message) ?? "").split("\n")[0]
77 const who = text(build.creator?.name)
78
79 return {
80 title: `${state.emoji} ${pipeline}${number ? ` #${number}` : ""} ${state.verb}`,
81 message: (text(build.branch) ?? "A build") + (subject ? ` — ${subject}` : "") + (who ? ` (${who})` : ""),
82 topic: "Buildkite",
83 priority: state.priority,
84 buttons: link(build.web_url, "View build"),
85 }
86}
Payload

The Buildkite build.finished webhook

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

build.finished · 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": "failed",
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": "2026-09-24T21:08:59.874Z",
27 "pull_request": null,
28 "scheduled_at": "2026-09-24T21:05:59.874Z",
29 "cancel_reason": null
30 },
31 "event": "build.finished",
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 finished 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.