diagnose-flow

Diagnoses failed Power Automate flow runs and identifies root causes with remediation steps.

808|167|Updated Jan 21, 2026
One-click install
npx skills add https://github.com/microsoft/power-platform-skills --skill diagnose-flow
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: diagnose-flow
Source: https://github.com/microsoft/power-platform-skills/tree/main/plugins/power-automate/skills/diagnose-flow
Command: npx skills add https://github.com/microsoft/power-platform-skills --skill diagnose-flow

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

When a Power Automate flow run fails, manually tracing through run history, action outputs, and flow definitions to find the root cause is slow and error-prone. This Skill automates deep failure analysis of a specific failed run given its environment, flow, and run IDs.

Core Features & Use Cases

  • Automated triage: Uses the FlowAgent MCP diagnose_run tool to classify failed or timed-out actions, then gathers run details, action traces, and the flow definition in parallel.
  • Root cause analysis: Builds an execution graph from runAfter dependencies, distinguishes root failures from cascading skips, and classifies errors such as authorization failures, expression errors, HTTP 4xx/5xx, timeouts, and parameter validation issues.
  • Actionable remediation: Produces a diagnosis report with an execution timeline, root cause, specific fix, and confidence level, and can optionally apply the fix directly via edit_flow or update_flow.
  • Use Case: A scheduled flow failed overnight. Provide the environment, flow, and run IDs, and receive a full report identifying the failing action inside a loop, the underlying connection error, and a corrected flow definition.

Quick Start

Ask the agent to diagnose the failed flow run by providing the environment ID, flow ID, and run ID, for example: diagnose flow run with env-id, flow-id, and run-id.

Frequently Asked Questions about diagnose-flow

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I diagnose a failed Power Automate flow run?

Provide the environment ID, flow ID, and run ID to the diagnose-flow skill. It triages the run with the diagnose_run tool, gathers run details and action traces, and returns a report with the root cause, a specific fix, and a confidence level.

What information do I need to investigate a failed flow run?

You need three identifiers: the environment ID, the flow ID, and the run ID of the failed execution. These are passed as arguments, and the skill uses FlowAgent MCP tools to retrieve all remaining context automatically.

Can this skill fix the flow after diagnosing the failure?

Yes. If the root cause is a definition issue, the skill can apply a surgical fix using edit_flow for a single action or parameter, falling back to update_flow only for large rewrites. Applying the fix is optional.

What types of flow failures can be detected?

The analysis classifies authorization and connection errors, expression evaluation failures, HTTP 4xx/5xx responses from external services, timeouts, parameter validation failures, and action type mismatches such as OpenApiConnection versus webhook triggers.

Why does the diagnose-flow skill report no MCP tools available?

The skill depends on FlowAgent MCP tools surfaced as mcp__flowagent__ tools. If none are present, the plugin is not wired up correctly, and you should run the setup skill from the power-automate plugin first.