MR
Mayur Rathi
@github
⭐ 34.1k GitHub stars

Flowstudio-Power-Automate-Debug

Flowstudio-Power-Automate-Debug是一款code方向的AI技能,核心价值是>-,可用于解决开发者在code领域的实际问题,帮助用户提升效率、自动化重复任务或优化工作流。

>-

Last verified on: 2026-05-30
mkdir -p ./skills/flowstudio-power-automate-debug && curl -sfL https://raw.githubusercontent.com/github/awesome-copilot/main/skills/flowstudio-power-automate-debug/SKILL.md -o ./skills/flowstudio-power-automate-debug/SKILL.md

Run in terminal / PowerShell. Requires curl (Unix) or PowerShell 5+ (Windows).

Skill Content

# Power Automate Debugging with FlowStudio MCP


A step-by-step diagnostic process for investigating failing Power Automate

cloud flows through the FlowStudio MCP server.


> **Real debugging examples**: [Expression error in child flow](https://github.com/ninihen1/power-automate-mcp-skills/blob/main/examples/fix-expression-error.md) |

> [Data entry, not a flow bug](https://github.com/ninihen1/power-automate-mcp-skills/blob/main/examples/data-not-flow.md) |

> [Null value crashes child flow](https://github.com/ninihen1/power-automate-mcp-skills/blob/main/examples/null-child-flow.md)


**Prerequisite**: A FlowStudio MCP server must be reachable with a valid JWT.

See the `flowstudio-power-automate-mcp` skill for connection setup.

Subscribe at https://mcp.flowstudio.app


---


Source of Truth


> **Always call `list_skills` / `tool_search` first** to confirm available tool

> names and parameter schemas. Tool names and parameters may change between

> server versions.

> This skill covers response shapes, behavioral notes, and diagnostic patterns —

> things tool schemas cannot tell you. If this document disagrees with

> `tool_search` or a real API response, the API wins.


---


Python Helper


python
import json, urllib.request

MCP_URL   = "https://mcp.flowstudio.app/mcp"
MCP_TOKEN = "<YOUR_JWT_TOKEN>"

def mcp(tool, **kwargs):
    payload = json.dumps({"jsonrpc": "2.0", "id": 1, "method": "tools/call",
                          "params": {"name": tool, "arguments": kwargs}}).encode()
    req = urllib.request.Request(MCP_URL, data=payload,
        headers={"x-api-key": MCP_TOKEN, "Content-Type": "application/json",
                 "User-Agent": "FlowStudio-MCP/1.0"})
    try:
        resp = urllib.request.urlopen(req, timeout=120)
    except urllib.error.HTTPError as e:
        body = e.read().decode("utf-8", errors="replace")
        raise RuntimeError(f"MCP HTTP {e.code}: {body[:200]}") from e
    raw = json.loads(resp.read())
    if "error" in raw:
        raise RuntimeError(f"MCP error: {json.dumps(raw['error'])}")
    return json.loads(raw["result"]["content"][0]["text"])

ENV = "<environment-id>"   # e.g. Default-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

---


Step 1 — Locate the Flow


python
result = mcp("list_live_flows", environmentName=ENV)
# Returns a wrapper object: {mode, flows, totalCount, error}
target = next(f for f in result["flows"] if "My Flow Name" in f["displayName"])
FLOW_ID = target["id"]   # plain UUID — use directly as flowName
print(FLOW_ID)

---


Step 2 — Find the Failing Run


python
runs = mcp("get_live_flow_runs", environmentName=ENV, flowName=FLOW_ID, top=5)
# Returns direct array (newest first):
# [{"name": "08584296068667933411438594643CU15",
#   "status": "Failed",
#   "startTime": "2026-02-25T06:13:38.6910688Z",
#   "endTime": "2026-02-25T06:15:24.1995008Z",
#   "triggerName": "manual",
#   "error": {"code": "ActionFailed", "message": "An action failed..."}},
#  {"name": "...", "status": "Succeeded", "error": null, ...}]

for r in runs:
    print(r["name"], r["status"], r["startTime"])

RUN_ID = next(r["name"] for r in runs if r["status"] == "Failed")

---


Step 3 — Get the Top-Level Error


> **CRITICAL**: `get_live_flow_run_error` tells you **which** action failed.

> `get_live_flow_run_action_outputs` tells you **why**. You must call BOTH.

> Never stop at the error alone — error codes like `ActionFailed`,

> `NotSpecified`, and `InternalServerError` are generic wrappers. The actual

> root cause (wrong field, null value, HTTP 500 body, stack trace) is only

> visible in the action's inputs and outputs.


python
err = mcp("get_live_flow_run_error",
    environmentName=ENV, flowName=FLOW_ID, runName=RUN_ID)
# Returns:
# {
#   "runName": "08584296068667933411438594643CU15",
#   "failedActions": [
#     {"actionName": "Apply_to_each_prepare_workers", "status": "Failed",
#      "error": {"code": "ActionFailed", "message": "An action failed..."},
#      "startTime": "...", "endTime

🎯 Best For

  • Debugging engineers
  • QA teams
  • Claude users
  • GitHub Copilot users
  • Software engineers

💡 Use Cases

  • Tracing runtime errors in production logs
  • Identifying memory leaks
  • Code quality improvement
  • Best practice enforcement

📖 How to Use This Skill

  1. 1

    Install the Skill

    Copy the install command from the Terminal tab and run it. The SKILL.md file downloads to your local skills directory.

  2. 2

    Load into Your AI Assistant

    Open Claude or GitHub Copilot and reference the skill. Paste the SKILL.md content or use the system prompt tab.

  3. 3

    Apply Flowstudio-Power-Automate-Debug to Your Work

    Open your project in the AI assistant and ask it to apply the skill. Start with a small module to verify the output quality.

  4. 4

    Review and Refine

    Review AI suggestions before committing. Run tests, check for regressions, and iterate on the skill output.

❓ Frequently Asked Questions

Can this debug production issues?

Yes, but always ensure you have proper logging and monitoring in place first.

Is Flowstudio-Power-Automate-Debug compatible with Cursor and VS Code?

Yes — this skill works with any AI coding assistant including Cursor, VS Code with Copilot, and JetBrains IDEs.

Do I need specific dependencies for Flowstudio-Power-Automate-Debug?

Check the install command and Works With section. Most code skills only require the AI assistant and your codebase.

How do I install Flowstudio-Power-Automate-Debug?

Copy the install command from the Terminal tab and run it. The skill downloads to ./skills/flowstudio-power-automate-debug/SKILL.md, ready to use.

Can I customize this skill for my team?

Absolutely. Edit the SKILL.md file to add team-specific instructions, examples, or workflows.

⚠️ Common Mistakes to Avoid

Debugging without context

Always provide the full error stack and surrounding code context for accurate debugging.

Skipping validation

Always test AI-generated code changes, even for simple refactors.

Missing dependency updates

Check if the skill requires updated dependencies or new packages.

🔗 Related Skills