Better Stack on-call change notifications on your phone.

Get a push notification when the on-call person changes on a Better Stack on-call calendar.

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 Better Stack

Add it as a webhook for On-call change.

STEP 03

Get a push on your phone

With the text, sound and buttons from the recipe.

Setup

How to set up the Better Stack on-call change 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 Better Stack Uptime, go to Integrations > Exporting data > Outgoing webhooks and add one.
  3. Paste your webhook URL as the URL and keep the default template.https://••••••••/•••••••• your personal URL, shown after install
  4. Choose which On-call change events to send and save.
  5. In Better Stack Uptime, go to **Integrations → Exporting data → Outgoing webhooks**, add an **on-call change** webhook with the URL above, and keep the default template.
  6. Better Stack doesn't sign webhooks, 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// Better Stack → on-call change
2// Fires when the on-call person changes on a Better Stack on-call calendar, if an
3// outgoing webhook with the default on-call template is set up.
4// Docs: https://betterstack.com/docs/uptime/webhooks/
5
6function handleRequest(request) {
7 const data = (request.body || {}).data
8
9 // Guard: only on-call payloads, which carry a calendar and a list of emails.
10 if (!data || !Array.isArray(data.emails) || !("calendar_name" in data || "calendar_id" in data)) {
11 console.log("Not a Better Stack on-call change — skipping")
12 return null
13 }
14
15 const who = data.emails.filter((email) => typeof email === "string" && email.trim())
16 const calendar = typeof data.calendar_name === "string" && data.calendar_name.trim() ? data.calendar_name.trim() : "on-call"
17
18 return {
19 title: `📟 ${calendar} rotation changed`,
20 message:
21 (typeof data.message === "string" && data.message.trim()) ||
22 (who.length ? `Now on call: ${who.join(", ")}` : "Nobody is on call"),
23 topic: "Better Stack",
24 priority: 0, // Normal — worth knowing whether it's you now
25 }
26}
Payload

The Better Stack on_call_change webhook

This is what Better Stack sends to your URL for on-call change. It is a sample, trimmed to the fields recipes use.

on_call_change · sample.json
1{
2 "data": {
3 "emails": [
5 ],
6 "message": "Jane Doe is now on call for Primary.",
7 "calendar_id": 42,
8 "calendar_name": "Primary",
9 "primary_calendar": true
10 }
11}
FAQ

Better Stack on-call change 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 Better Stack 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

Better Stack on your phone in two minutes.

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