PagerDuty On-Call Schedule Digest
Each morning (and at shift change) the flow reads who is currently and next on call across PagerDuty schedules and posts a clear roster to a Teams channel plus an email to the team. Highlights any schedule gaps or unfilled shifts. Gives everyone a single, current view of on-call coverage.
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 publishes a clear, current on-call roster from PagerDuty every morning. It reads who is currently and next on call across the configured schedules, detects any coverage gaps, formats an HTML roster card, and posts it to a Teams channel and emails it to the team distribution list.
Why it matters: People waste time figuring out who to page during an incident. A daily, current roster posted where the team already works removes the guesswork and surfaces unfilled shifts before they cause a missed page. Built and verified (Flow Checker 0 errors / 0 warnings). Ships Off - going live requires only authorizing the connections and setting the environment variable values.
Use Case
A team running multiple PagerDuty schedules wants one current view of who is on call (and who is next), posted where everyone already works, with explicit warnings about schedules that have no coverage in the window.
Flow Architecture
Daily 0800 Roster
Recurrence (Day/1 @ 08:00)Fires every morning to publish the roster.
Init PagerDuty API Base + Schedule Ids
Initialize VariablePagerDuty REST base URL and the comma list of schedule IDs to report.
Init Look Ahead Days
Initialize VariableDays ahead to include the next shift.
Init Teams Group/Channel + Team Email
Initialize VariableTarget Teams team/channel IDs and the roster email recipient.
Compose OnCall Query URI
ComposeBuilds the /oncalls URL (schedule filter + time window).
Get OnCall Roster
HTTP (built-in)Calls PagerDuty GET /oncalls with the token header (no connector op exists).
Filter Coverage Gaps
Filter array (Query)Keeps configured schedule IDs with no on-call in the window.
Select Roster Rows + Compose HTML
Select + ComposeMaps each on-call to an HTML table row and assembles the final HTML roster card, including a gap-warning block.
Post Roster To Teams
Teams PostMessageToConversationPosts the roster card to the Teams channel.
Email Roster To Team
Outlook SendEmailV2Emails the same roster card to the team (runs in parallel with the Teams post).
Environment Variables
| Schema name | Type | Default | Description |
|---|---|---|---|
| flowlibs_PagerDutyApiBase | String | https://api.pagerduty.com | PagerDuty REST API base URL. |
| flowlibs_PagerDutyApiToken | String | REPLACE_WITH_PAGERDUTY_API_TOKEN | PagerDuty REST token (read on schedules + on-calls). |
| flowlibs_PagerDutyScheduleIds | String | PSCHED01,PSCHED02 | Comma list of schedule IDs to report on. |
| flowlibs_TeamEmail | String | alerts@yourcompany.com | Roster email recipient. |
| flowlibs_OnCallLookAheadDays | String | 2 | Days ahead to query (current + next shift). |
| flowlibs_TeamsGroupId | String | <your-team-id> | Target Teams team (AAD group) ID (reused). |
| flowlibs_TeamsChannelId | String | <your-channel-id> | Target Teams channel ID (reused). |
Connectors & Connections
| Connector | API name | Actions used |
|---|---|---|
| PagerDuty | shared_pagerduty | GET /oncalls |
| Microsoft Teams | shared_teams | PostMessageToConversation |
| Office 365 Outlook | shared_office365 | SendEmailV2 |
Note — All connections are referenced as solution connection references; the flow is portable between environments as long as a connection is mapped at import time.
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.
- Shift-change ping
- Add a second Recurrence near handoff time, or a Teams DM to the incoming on-call person.
- Per-schedule display names
- The roster already shows schedule.summary; group rows by schedule or sort by start time as needed.
- Holiday awareness
- Flag on-call windows that fall on company holidays before posting.
- Escalation context
- The roster includes the escalation level; extend it to list the full escalation policy via GET /oncalls?include[]=escalation_policies.
- Mobile push
- Add a Power Automate / Power Apps notification for field staff who are not in Teams.
- Swap to a connector action
- If PagerDuty publishes an on-call connector operation, replace Get OnCall Roster (HTTP) with it; nothing downstream changes.
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.01On-calls query URL
Current plus next-shift on-calls for the configured schedules.
EXPR.02Coverage-gap filter
Keeps schedule IDs with no on-call in the window.
EXPR.03Roster row template
Maps each on-call to an HTML table row.
EXPR.04Current on-call name (sample)
Reads the first on-call person's name.
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.