Suspended Flow Auto-Restart Monitor
Periodically check for suspended flows and auto-turn them back on, notifying the owner via Teams of the restart.
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
The Suspended Flow Auto-Restart Monitor is a governance flow that periodically scans the Power Automate environment for flows in a *Suspended* state and automatically turns them back on. It notifies the admin team via Teams and sends a summary email listing all restarted flows with timestamps.
Flows can become suspended due to connector failures, licensing issues, or repeated run failures. This monitor ensures critical automation stays running with minimal manual intervention.
Use Case
Designed for IT admin teams who manage large Power Automate estates and need automated recovery from silent suspension events. The flow reduces mean-time-to-recovery (MTTR), provides an audit trail of restart events via Teams channel posts and an email summary, and supports an exclusion list so flows that should remain suspended intentionally are never auto-restarted.
The flow is ideal for teams that:
- IT Admins who manage a large number of Power Automate flows and need automated recovery from suspension events
- Reduces mean-time-to-recovery (MTTR) when flows are silently suspended
- Provides an audit trail of restart events via Teams channel posts and email summaries
- Supports an exclusion list to skip specific flows that should remain suspended intentionally
Flow Architecture
Check for Suspended Flows
RecurrenceScheduled trigger that runs every 6 hours to scan the environment for suspended flows.
Initialize Variable - varEnvironmentId
Initialize variableLoads the Power Automate environment ID from env var flowlibs_PowerAutomateEnvironmentId.
Initialize Variable - varTeamsGroupId
Initialize variableLoads the Teams group ID from env var flowlibs_TeamsGroupId.
Initialize Variable - varTeamsChannelId
Initialize variableLoads the Teams channel ID from env var flowlibs_TeamsChannelId.
Initialize Variable - varAdminEmail
Initialize variableLoads the admin email from env var flowlibs_AdminNotificationEmail.
Initialize Variable - varExcludedFlows
Initialize variableLoads the comma-separated exclusion list from env var flowlibs_ExcludedFlowNames.
Initialize Variable - varRestartedCount
Initialize variableInteger counter starting at 0; tracks how many flows were restarted this run.
Initialize Variable - varRestartedSummary
Initialize variableString to accumulate HTML table rows that will be sent in the summary email.
List My Flows
Power Automate Management - List My FlowsRetrieves all flows in the target environment using the Power Automate Management connector.
Environment Variables
| Schema name | Type | Default | Description |
|---|---|---|---|
| flowlibs_PowerAutomateEnvironmentId | String | Default-<your-tenant-id> | Target environment GUID for the List My Flows scan. Replace with your tenant's Power Automate default environment ID. |
| flowlibs_TeamsGroupId | String | <configure> | Teams group/team ID that owns the channel where restart notifications are posted. |
| flowlibs_TeamsChannelId | String | <configure> | Teams channel ID where restart notification cards are posted. |
| flowlibs_AdminNotificationEmail | String | admin@contoso.com | Recipient address for the HTML summary email listing restarted flows. |
| flowlibs_ExcludedFlowNames | String | — | Comma-separated list of flow display names that should be skipped (never auto-restarted). |
| flowlibs_FlowCheckIntervalMinutes | String | 15 | Reference value for the scan interval. The actual recurrence cadence is configured on the trigger. |
| flowlibs_EnvironmentDisplayName | String | your-org (Default) | Friendly environment name shown in Teams notifications and email reports. |
Connectors & Connections
| Connector | API name | Actions used |
|---|---|---|
| Power Automate Management | shared_flowmanagement | ListMyFlows StartFlow (restarts the suspended flow) |
| Microsoft Teams | shared_teams | PostMessageToConversation (posts restart alert to admin channel) |
| Office 365 Outlook | shared_office365 | SendEmailV2 (HTML summary email to admin) |
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.
- Change the scan frequency
- Edit the Recurrence trigger and adjust frequency and interval. Default is every 6 hours - drop it to every 1 hour for tighter recovery SLAs or stretch it for less noisy environments.
- Update notification targets
- Set flowlibs_TeamsGroupId and flowlibs_TeamsChannelId to the Teams group/channel that should receive restart alerts, and set flowlibs_AdminNotificationEmail to the summary email recipient.
- Exclude specific flows
- Add flow display names (comma-separated) to flowlibs_ExcludedFlowNames. Excluded flows will remain suspended even when they are found by the scan.
- Multi-environment support
- Deploy the solution to each environment and update flowlibs_PowerAutomateEnvironmentId per environment so each instance scans its own scope.
- Add error handling around StartFlow
- Wrap the StartFlow action in a Scope and use 'Configure run after' on a sibling action to catch restart failures and log them to a separate channel or SharePoint list.
- Run Flow Checker after deployment
- After importing the solution, run the Power Automate Flow Checker to verify connection references resolve and no expressions fail validation in your tenant.
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.01Access the flows array from List My Flows
Returns the array of flow objects returned by the Power Automate Management connector.
EXPR.02Filter to only suspended flows
Used inside Filter Array to isolate flows whose state is Suspended.
EXPR.03Current flow display name in loop
Gets the display name of the flow currently being processed in the For Each.
EXPR.04Current flow GUID in loop
Gets the flow GUID; passed as the flowName parameter to StartFlow.
EXPR.05Exclusion list check
True when the current flow's display name appears in the comma-separated exclusion list.
EXPR.06Count of suspended flows found
Used to decide whether the loop and notification branches should run at all.
EXPR.07Running restart counter
Compared against 0 to decide whether to send the summary email.
Comments
Sign in to join the conversation.
Sign inNo comments yet. Be the first to share your experience with this flow.