# PagerDuty incident triggered notifications on your phone > Get a Highest-priority push notification when a PagerDuty incident is triggered or reopened, with its service, priority and who's on it. - Company: PagerDuty (https://www.justpush.io/recipes/pagerduty) - Event: `incident.triggered` (incident.triggered and incident.reopened) - Tags: Monitoring & observability, Issues & tickets, Uptime & downtime - Install: https://studio.justpush.io/recipes/pagerduty/incident-triggered - Web page: https://www.justpush.io/recipes/pagerduty/incident-triggered ## Setup 1. Click Install in Studio and sign in. The recipe is added to your account and you get a personal webhook URL. 2. In PagerDuty, go to Integrations > Generic Webhooks (v3) and click New Webhook (or add one on a service's Integrations tab). 3. Paste your webhook URL (shown in Studio after install) as the Webhook URL. 4. Under Event Subscription, tick incident.triggered and incident.reopened and click Add Webhook. 5. Create a v3 webhook under **Integrations → Generic Webhooks (v3) → New Webhook** (Managers and Admins), or on a single service under **Services → Service Directory → your service → Integrations → Webhooks**. Paste the URL above and tick **incident.triggered**. Tick **incident.reopened** too if you want a push when a resolved incident comes back. The recipe ignores every other event type. 6. To check the connection, open the webhook, click **Send Test Event** under **Test**, and you'll get a quiet "PagerDuty connected" push. 7. High-urgency incidents push at Highest priority, low-urgency ones at High. For acknowledgements and resolutions, add the **Incident acknowledged or resolved** recipe as a separate webhook. 8. PagerDuty signs every v3 webhook with an `X-PagerDuty-Signature` header (HMAC-SHA256 with the subscription's secret), but JustPush doesn't check that signature yet, so keep your endpoint URL private. ## Code Studio calls `handleRequest(request)` with the incoming webhook (`{ method, headers, body, query, raw }`) and sends the message object it returns. Returning `null` sends nothing. ```js // PagerDuty → incident.triggered (and incident.reopened) // Fires when a PagerDuty v3 webhook subscription reports a new incident, or one that was // resolved and has been reopened. // Docs: https://docs.pagerduty.com/developer/webhooks-overview // The events this recipe pushes for, and how to title them. const EVENTS = { "incident.triggered": "🔴", "incident.reopened": "🔴 Reopened:", } // High-urgency incidents page people, so they're Highest (2); low-urgency ones don't // wake anyone up, so they're High (1). PagerDuty's default urgency is high, so an // unknown value is treated the same way. const URGENCY = { high: 2, low: 1, } // Look a key up without tripping over inherited names like "toString". function pick(table, key, fallback) { return typeof key === "string" && Object.prototype.hasOwnProperty.call(table, key) ? table[key] : fallback } // Only link to real http(s) URLs. function link(url, cta) { return typeof url === "string" && /^https?:\/\//.test(url) ? [{ cta, url }] : [] } // A trimmed string, or null for anything else. function text(value) { return typeof value === "string" && value.trim() ? value.trim() : null } function handleRequest(request) { const body = request.body && typeof request.body === "object" ? request.body : {} const event = body.event && typeof body.event === "object" ? body.event : {} const type = event.event_type // "Send Test Event" on the subscription sends a pagey.ping; confirm the connection quietly. if (type === "pagey.ping") { return { title: "🔔 PagerDuty connected", message: text(event.data?.message) ?? "Your webhook subscription is working", topic: "PagerDuty", priority: -1, } } // Guard: only new or reopened incidents. v3 webhooks have no event header, so the // payload's event_type decides. const incident = event.data if (!pick(EVENTS, type, null) || !incident || typeof incident !== "object") { console.log(`Ignoring PagerDuty "${type ?? "unknown"}" event`) return null } const title = text(incident.title) ?? text(incident.summary) ?? "New incident" const number = Number.isFinite(incident.number) ? `#${incident.number}` : null const assignees = (Array.isArray(incident.assignees) ? incident.assignees : []) .map((user) => text(user?.summary)) .filter(Boolean) .join(", ") const details = [ number, text(incident.service?.summary), text(incident.priority?.summary), assignees, ].filter(Boolean) return { title: `${EVENTS[type]} ${title}`, message: details.join(" · ") || "A new incident needs a responder", topic: "PagerDuty", priority: pick(URGENCY, incident.urgency, 2), // see URGENCY above buttons: link(incident.html_url, "Open incident"), } } ``` ## PagerDuty incident.triggered webhook payload (sample) ```json { "event": { "id": "01D8XQ2R5ZK3Q7N0W4H6J9ABCD", "data": { "id": "PGR0VU2", "self": "https://api.pagerduty.com/incidents/PGR0VU2", "type": "incident", "teams": [ { "id": "PFCVPS0", "self": "https://api.pagerduty.com/teams/PFCVPS0", "type": "team_reference", "summary": "Payments", "html_url": "https://acme.pagerduty.com/teams/PFCVPS0" } ], "title": "Checkout API error rate above 5%", "number": 1234, "status": "triggered", "service": { "id": "PF9KMXH", "self": "https://api.pagerduty.com/services/PF9KMXH", "type": "service_reference", "summary": "Checkout API", "html_url": "https://acme.pagerduty.com/services/PF9KMXH" }, "urgency": "high", "html_url": "https://acme.pagerduty.com/incidents/PGR0VU2", "priority": { "id": "PSO75BM", "self": "https://api.pagerduty.com/priorities/PSO75BM", "type": "priority_reference", "summary": "P1", "html_url": "https://acme.pagerduty.com/account/incident_priorities" }, "assignees": [ { "id": "PTUXL6G", "self": "https://api.pagerduty.com/users/PTUXL6G", "type": "user_reference", "summary": "Sam Lee", "html_url": "https://acme.pagerduty.com/users/PTUXL6G" } ], "created_at": "2026-09-29T10:51:28Z", "incident_key": "d3640fbd41094207a1c11e58e46b1662", "resolve_reason": null, "conference_bridge": null, "escalation_policy": { "id": "PUS0KTE", "self": "https://api.pagerduty.com/escalation_policies/PUS0KTE", "type": "escalation_policy_reference", "summary": "Checkout on-call", "html_url": "https://acme.pagerduty.com/escalation_policies/PUS0KTE" } }, "agent": null, "client": null, "event_type": "incident.triggered", "occurred_at": "2026-09-29T10:51:28.169Z", "resource_type": "incident" } } ``` ## FAQ ### 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 PagerDuty 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.