PagerDuty Unacknowledged Incident Auto-Reassign
On a short schedule, the flow finds PagerDuty incidents triggered but unacknowledged past a threshold, re-pages or reassigns to the next responder/escalation level, posts to Teams, and emails the on-call manager. Logs each auto-action. A safety net that ensures no urgent incident is silently missed.
Provided as-is, without warranty of any kind. Review and test each pattern in a non-production environment before deploying it to live automations. See our Terms.
Overview
This flow is an independent watchdog for missed pages in PagerDuty. On a 5-minute schedule it finds incidents that are still triggered (unacknowledged) past a configurable threshold, auto-escalates them via a PagerDuty escalation policy, writes an audit note onto the incident, posts an alert to Teams, logs every auto-action to a Dataverse table, and emails the on-call manager a digest.
Why it matters: PagerDuty's native escalation policies handle most paging, but ops teams often want a second, independent safety net with their own threshold, management visibility, and an auditable record - so nothing urgent is silently missed. Built (FlowLibs CF-494). Ships Off; going live requires only connection authorization plus environment-variable values.
Use Case
An ops team wants a backstop that catches unacknowledged high-urgency incidents fast, bumps them up the escalation chain, tells management, and keeps a record - beyond the default PagerDuty escalation policy. A built-in de-dupe guard (a Dataverse ledger keyed on incident id) ensures the same incident isn't escalated repeatedly on every 5-minute run.
Flow Architecture
Every 5 Minutes
RecurrenceTight watchdog cadence.
Initialize Correlation Id + Threshold
Initialize Variableguid() run trace id stamped on every note, Teams post, log row and the email; int() of the threshold env var.
Initialize manager email, From user, policy, Teams ids
Initialize VariableBind the env vars to working variables plus the escalation summary and escalated-count accumulators.
Get Active Incidents
PagerDuty GetActiveIncidentsReturns body/incidents[] (triggered + acknowledged).
Filter Unacknowledged Past Threshold
Filter Array (Query)Keeps status=triggered AND urgency=high AND unacked minutes greater than the threshold.
Apply To Each Stale Incident
ForeachIterates the stale incidents.
List Prior Escalations + Check Not Already Escalated
Dataverse ListRecords + ConditionDe-dupe check against the audit table; only act if this incident hasn't been logged before.
Escalate Incident + Add Auto Action Note
PagerDuty EscalateIncident + AddNoteToIncidentApplies the escalation policy (request/userId + request/policyId) and posts an audit note onto the incident.
Post To Teams + Log Escalation
Teams PostMessageToConversation + Dataverse CreateRecordSurfaces the escalation in the ops channel and writes an audit row (whole-object bind); appends to the digest and increments the count.
Environment Variables
| Schema name | Type | Default | Description |
|---|---|---|---|
| flowlibs_UnackedThresholdMinutes | String | 10 | Minutes an incident may stay triggered/unacknowledged before auto-escalation. |
| flowlibs_OnCallManagerEmail | String | alerts@yourcompany.com | Mailbox that receives the auto-escalation digest. |
| flowlibs_PagerDutyFromUserId | String | REPLACE_WITH_PAGERDUTY_USER_ID | From author id required by PagerDuty escalate + note writes. |
| flowlibs_PagerDutyEscalationPolicyId | String | <configure> | Escalation policy applied when auto-escalating. |
| flowlibs_TeamsGroupId | String | <your-team-id> | Ops Teams team/group id. |
| flowlibs_TeamsChannelId | String | <your-channel-id> | Ops Teams channel id. |
Connectors & Connections
| Connector | API name | Actions used |
|---|---|---|
| PagerDuty | shared_pagerduty | GetActiveIncidents EscalateIncident AddNoteToIncident |
| Microsoft Teams | shared_teams | PostMessageToConversation |
| Office 365 Outlook | shared_office365 | SendEmailV2 |
| Microsoft Dataverse | shared_commondataserviceforapps |
Customization Guide
Almost every realistic variant of this flow can be implemented by changing environment variable values. A few cases require small edits inside the flow definition — those are called out explicitly below.
- Threshold
- Change flowlibs_UnackedThresholdMinutes (no flow edit needed).
- Urgency scoping
- The filter only watchdogs urgency = high; widen it in Filter Unacknowledged Past Threshold to include low urgency if desired.
- Reassign instead of escalate
- Swap EscalateIncident for ReassignIncident (body request/userId + request/reassignUserId) to route to a specific responder instead of bumping the policy level.
- Cadence
- Adjust the Recurrence interval (default 5 minutes).
- De-dupe window
- Currently de-dupes on any prior log row for the incident; add a created-on window to the ListRecords $filter to allow re-escalation after N hours.
- SMS backstop
- Add a Twilio SendMessage on repeat breaches (reuses the FlowLibs Twilio connection).
Key Expressions
The flow is intentionally light on Power Fx / WDL gymnastics — the heaviest expressions are the branch-name concatenation and the approval outcome check. They are listed below in the order they appear in the flow.
EXPR.01Unacked minutes
Minutes the incident has been unacknowledged.
EXPR.02Stale + high-urgency filter
Triggered, high urgency, and past the threshold.
EXPR.03De-dupe gate
Only act if this incident has no prior log row.
EXPR.04Email gate
Email only when something was escalated this run.
Customize & download
Generate a ready-to-import copy of this solution with your environment-variable values baked in — available on Base, Pro, or Team.
Upgrade to customize
Comments
Sign in to join the conversation.
Sign inNo comments yet. Be the first to share your experience with this flow.