SuperAPI AI 工具集

power-automate-debug

部署与运维

查看项目

更新于 10-16 01:39

技能介绍

用途:通过 FlowStudio MCP 服务器,为失败或异常的 Power Automate 云流提供分步诊断流程。Graph API 通常只暴露顶层状态码,该技能转而读取运行级动作的输入与输出,以定位真正根因。前置条件为可访问的 FlowStudio MCP 服务器和有效 JWT,连接配置参考 power-automate-mcp 技能。

主要能力与流程:先调用 list_skills / tool_search 确认工具名与参数;用 list_live_flows 定位目标流(返回 {mode, flows, totalCount, error}),target["id"] 为 UUID,可直接作为 flowName;用 get_live_flow_runs 获取近期运行(数组,最新在前),筛出 status 为 Failed 的 runName;再用 get_live_flow_run_error 获取 failedActions(外层到内层,最后一条为根因)与 allActions 状态;关键是必须同时调用 get_live_flow_run_action_outputs 查看失败动作的 inputs/outputs,因为 ActionFailed、NotSpecified、InternalServerError 等多为通用包装码,真实细节(HTTP 状态码、响应体、堆栈、空值)只在该动作输入输出中。foreach 内动作可用 repetitionIndexes / iterationIndex 检查具体迭代。若数据可疑,继续向上游动作回溯,寻找空值或字段路径错误来源;用 get_live_flow 读取流定义以核对表达式。修复后可用 resubmit_live_flow_run 重放原触发载荷验证(适用于任意触发类型,但从未运行过的新流除外),或对 HTTP/Button/PowerApps 触发用 trigger_live_flow 发送自定义 body;Recurrence 流可直接立即运行。测试 HTTP 类流时可从流定义读取 trigger schema 与 Response action 的响应 schema,trigger_live_flow 返回 responseStatus、responseBody、triggerKind、invocation、runName,并可能包含 warning。

限制:update_live_flow 总会返回 error 键,null 表示成功;连接授权失败(ConnectionAuthorizationFailed)需在 PA 设计器中处理,无法通过 API 修复;Outlook 用户选择器的 DynamicListValuesUndefinedOrInvalid 源于 builtInOperation:AadGraph.GetUsers 在 listEnum 层损坏,应改用 shared_office365users.SearchUserV2 并用 describe_live_connector、get_live_dynamic_options、get_live_dynamic_properties 处理。若本文档与 tool_search 或实际 API 响应冲突,以 API 为准。调试书签(Compose_Request / Compose_Result)可用于快照载荷,但不要包含密钥或长二进制内容,且输出可能很大需截断。订阅地址为 https://mcp.flowstudio.app,代码示例保留原文。