Netlify deploy notifications on your phone.

Get a push notification when a Netlify deploy succeeds or fails, louder when a production deploy breaks.

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 Netlify

Add it as a webhook for Deploy.

STEP 03

Get a push on your phone

With the text, sound and buttons from the recipe.

Setup

How to set up the Netlify deploy webhook

  1. Click Install in Studio and sign in. The recipe is added to your account and you get a personal webhook URL.
  2. Follow the setup notes below: Netlify has separate notification screens for deploys and forms.
  3. Add an HTTP POST request notification with your webhook URL as the URL.https://••••••••/•••••••• your personal URL, shown after install
  4. Save.
  5. In Netlify, open the site's **Project configuration → Notifications → Deploy notifications → Add notification → HTTP POST request**. Add one notification for **Deploy succeeded** and one for **Deploy failed**, both with the URL above. Other deploy events (started, locked, …) are ignored.
  6. Netlify doesn't say which event fired, so the recipe goes by the deploy's `state` (`ready` or `error`).
  7. Netlify can sign notifications with a JWS secret (`X-Webhook-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// Netlify → deploy succeeded or failed
2// Fires when a Netlify "HTTP POST request" deploy notification sends the deploy object.
3// Netlify doesn't say which event fired, so the recipe goes by the deploy's state.
4// Docs: https://docs.netlify.com/deploy/deploy-notifications/
5
6// Deploy contexts, as people say them.
7const CONTEXTS = { production: "production", "deploy-preview": "deploy preview", "branch-deploy": "branch deploy" }
8
9// Only link to real http(s) URLs.
10function link(url, cta) {
11 return typeof url === "string" && /^https?:\/\//.test(url) ? [{ cta, url }] : []
12}
13
14function handleRequest(request) {
15 const deploy = request.body || {}
16
17 // Guard: only finished deploys. Building/enqueued states are skipped (one push per deploy).
18 if (!deploy.site_id || !["ready", "error"].includes(deploy.state)) {
19 console.log(`Skipping Netlify deploy state "${deploy.state ?? "unknown"}"`)
20 return null
21 }
22
23 const failed = deploy.state === "error"
24 const name = deploy.name ?? "Your site"
25 const context = Object.prototype.hasOwnProperty.call(CONTEXTS, deploy.context) ? CONTEXTS[deploy.context] : deploy.context
26 const preview = deploy.review_id ? ` #${deploy.review_id}` : ""
27 const commit = (deploy.title ?? deploy.commit_message ?? "").split("\n")[0]
28 const details = failed
29 ? [deploy.error_message, deploy.branch].filter(Boolean)
30 : [deploy.branch, commit, deploy.committer ? `@${deploy.committer}` : null].filter(Boolean)
31 const log = deploy.admin_url && deploy.id ? `${deploy.admin_url.replace(/\/$/, "")}/deploys/${deploy.id}` : null
32
33 return {
34 title: `${failed ? "❌" : "✅"} ${name} ${failed ? "deploy failed" : "deployed"}${context ? ` (${context}${preview})` : ""}`,
35 message: details.join(" · ") || (failed ? "The deploy failed" : "Deploy is live"),
36 topic: "Netlify",
37 // A failed production deploy needs you; previews and successes can wait.
38 priority: failed ? (deploy.context === "production" ? 1 : 0) : -1,
39 buttons: [...link(log, failed ? "View deploy log" : "View deploy"), ...(failed ? [] : link(deploy.deploy_ssl_url ?? deploy.ssl_url, "Open site"))],
40 }
41}
Payload

The Netlify deploy webhook

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

deploy · sample.json
1{
2 "id": "65268a46257790246",
3 "url": "http://acme-site.netlify.app",
4 "name": "acme-site",
5 "state": "error",
6 "title": "Update Layout.js",
7 "branch": "main",
8 "context": "production",
9 "site_id": "b46da3f0-0ca7-4f81-9365-1a2b3c4d5e6f",
10 "ssl_url": "https://acme-site.netlify.app",
11 "build_id": "65268a461697790246",
12 "admin_url": "https://app.netlify.com/sites/acme-site",
13 "committer": "janedoe",
14 "review_id": null,
15 "commit_ref": "21cad587a3c5dbef9e0f548d",
16 "commit_url": "https://github.com/acme/site/commit/21cad587a3c5dbef9e0f548d",
17 "deploy_url": "http://main--acme-site.netlify.app",
18 "deploy_time": 42,
19 "published_at": null,
20 "error_message": "Build script returned non-zero exit code: 2",
21 "manual_deploy": false,
22 "commit_message": null,
23 "deploy_ssl_url": "https://main--acme-site.netlify.app"
24}
FAQ

Netlify deploy 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 Netlify 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

Netlify on your phone in two minutes.

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