flowstudio-power-automate-monitoring

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Power Automate Monitoring with FlowStudio MCP

基于FlowStudio MCP的Power Automate监控

Monitor flow health, track failure rates, and inventory tenant assets through the FlowStudio MCP cached store — fast reads, no PA API rate limits, and enriched with governance metadata and remediation hints.
Requires: A FlowStudio for Teams or MCP Pro+ subscription.
Start every session with
tools/list
to confirm tool names and parameters. This skill covers response shapes, behavioral notes, and workflow patterns — things
tools/list
cannot tell you. If this document disagrees with
tools/list
or a real API response, the API wins.

通过FlowStudio MCP 缓存存储监控流健康状态、跟踪失败率并清点租户资产——读取速度快,无PA API速率限制,还补充了治理元数据和修复建议。
每次会话都以
tools/list
开头
来确认工具名称和参数。本技能涵盖了响应结构、行为说明和工作流模式——这些是
tools/list
无法提供的信息。如果本文档与
tools/list
或实际API响应存在冲突,以API为准。

How Monitoring Works

监控工作原理

Flow Studio scans the Power Automate API daily for each subscriber and caches the results. There are two levels:
  • All flows get metadata scanned: definition, connections, owners, trigger type, and aggregate run statistics (
    runPeriodTotal
    ,
    runPeriodFailRate
    , etc.). Environments, apps, connections, and makers are also scanned.
  • Monitored flows (
    monitor: true
    ) additionally get per-run detail: individual run records with status, duration, failed action names, and remediation hints. This is what populates
    get_store_flow_runs
    ,
    get_store_flow_errors
    , and
    get_store_flow_summary
    .
Data freshness: Check the
scanned
field on
get_store_flow
to see when a flow was last scanned. If stale, the scanning pipeline may not be running.
Enabling monitoring: Set
monitor: true
via
update_store_flow
or the Flow Studio for Teams app (how to select flows).
Designating critical flows: Use
update_store_flow
with
critical=true
on business-critical flows. This enables the governance skill's notification rule management to auto-configure failure alerts on critical flows.

Flow Studio每天为每个订阅者扫描Power Automate API并缓存结果,分为两个层级:
  • 所有流都会扫描元数据:定义、连接、所有者、触发器类型、聚合运行统计数据(
    runPeriodTotal
    runPeriodFailRate
    等)。同时也会扫描环境、应用、连接和制作者信息。
  • 已监控的流
    monitor: true
    )还会额外获取每次运行的详情:包含状态、时长、失败操作名称和修复建议的单独运行记录。这些数据会填充到
    get_store_flow_runs
    get_store_flow_errors
    get_store_flow_summary
    接口中。
数据新鲜度: 可以查看
get_store_flow
返回的
scanned
字段确认流的最近扫描时间。如果数据过时,说明扫描管道可能未正常运行。
启用监控: 通过
update_store_flow
接口设置
monitor: true
,或使用Flow Studio for Teams应用设置(如何选择流)。
标记关键流: 对业务关键流调用
update_store_flow
并设置
critical=true
,这样治理技能的通知规则管理功能就可以为关键流自动配置失败告警。

Tools

工具列表

ToolPurpose
list_store_flows
List flows with failure rates and monitoring filters
get_store_flow
Full cached record: run stats, owners, tier, connections, definition
get_store_flow_summary
Aggregated run stats: success/fail rate, avg/max duration
get_store_flow_runs
Per-run history with duration, status, failed actions, remediation
get_store_flow_errors
Failed-only runs with action names and remediation hints
get_store_flow_trigger_url
Trigger URL from cache (instant, no PA API call)
set_store_flow_state
Start or stop a flow and sync state back to cache
update_store_flow
Set monitor flag, notification rules, tags, governance metadata
list_store_environments
All Power Platform environments
list_store_connections
All connections
list_store_makers
All makers (citizen developers)
get_store_maker
Maker detail: flow/app counts, licenses, account status
list_store_power_apps
All Power Apps canvas apps

工具用途
list_store_flows
列出流信息,支持按失败率和监控状态筛选
get_store_flow
获取完整缓存记录:运行统计、所有者、层级、连接、定义
get_store_flow_summary
聚合运行统计:成功率/失败率、平均/最大运行时长
get_store_flow_runs
每次运行的历史记录,包含时长、状态、失败操作、修复建议
get_store_flow_errors
仅返回失败的运行记录,包含操作名称和修复建议
get_store_flow_trigger_url
从缓存获取触发器URL(即时返回,无需调用PA API)
set_store_flow_state
启动或停止流,并将状态同步回缓存
update_store_flow
设置监控标记、通知规则、标签、治理元数据
list_store_environments
列出所有Power Platform环境
list_store_connections
列出所有连接
list_store_makers
列出所有制作者(公民开发者)
get_store_maker
制作者详情:流/应用数量、许可证、账户状态
list_store_power_apps
列出所有Power Apps画布应用

Store vs Live

存储工具 vs 实时工具

QuestionUse StoreUse Live
How many flows are failing?
list_store_flows
What's the fail rate over 30 days?
get_store_flow_summary
Show error history for a flow
get_store_flow_errors
Who built this flow?
get_store_flow
→ parse
owners
Read the full flow definition
get_store_flow
has it (JSON string)
get_live_flow
(structured)
Inspect action inputs/outputs from a run
get_live_flow_run_action_outputs
Resubmit a failed run
resubmit_live_flow_run
Store tools answer "what happened?" and "how healthy is it?" Live tools answer "what exactly went wrong?" and "fix it now."
If
get_store_flow_runs
,
get_store_flow_errors
, or
get_store_flow_summary
return empty results, check: (1) is
monitor: true
on the flow? and (2) is the
scanned
field recent? Use
get_store_flow
to verify both.

问题使用存储工具使用实时工具
有多少流运行失败?
list_store_flows
30天的失败率是多少?
get_store_flow_summary
存储工具回答“发生了什么?”和“健康状况如何?”的问题 实时工具回答“具体哪里出了问题?”和“立即修复”的问题。
如果
get_store_flow_runs
get_store_flow_errors
get_store_flow_summary
返回空结果,请检查:(1) 流是否设置了
monitor: true
?(2)
scanned
字段是否是近期时间?可以使用
get_store_flow
验证这两个条件。

Response Shapes

响应结构

list_store_flows

list_store_flows

Direct array. Filters:
monitor
(bool),
rule_notify_onfail
(bool),
rule_notify_onmissingdays
(bool).
json
[
  {
    "id": "Default-<envGuid>.<flowGuid>",
    "displayName": "Stripe subscription updated",
    "state": "Started",
    "triggerType": "Request",
    "triggerUrl": "https://...",
    "tags": ["#operations", "#sensitive"],
    "environmentName": "Default-26e65220-...",
    "monitor": true,
    "runPeriodFailRate": 0.012,
    "runPeriodTotal": 82,
    "createdTime": "2025-06-24T01:20:53Z",
    "lastModifiedTime": "2025-06-24T03:51:03Z"
  }
]
id
format:
Default-<envGuid>.<flowGuid>
. Split on first
.
to get
environmentName
and
flowName
.
triggerUrl
and
tags
are optional. Some entries are sparse (just
id
+
monitor
) — skip entries without
displayName
.
Tags on
list_store_flows
are auto-extracted from the flow's
description
field (maker hashtags like
#operations
). Tags written via
update_store_flow(tags=...)
are stored separately and only visible on
get_store_flow
— they do NOT appear in the list response.
直接返回数组,支持筛选参数:
monitor
(布尔值)、
rule_notify_onfail
(布尔值)、
rule_notify_onmissingdays
(布尔值)。
json
[
  {
    "id": "Default-<envGuid>.<flowGuid>",
    "displayName": "Stripe subscription updated",
    "state": "Started",
    "triggerType": "Request",
    "triggerUrl": "https://...",
    "tags": ["#operations", "#sensitive"],
    "environmentName": "Default-26e65220-...",
    "monitor": true,
    "runPeriodFailRate": 0.012,
    "runPeriodTotal": 82,
    "createdTime": "2025-06-24T01:20:53Z",
    "lastModifiedTime": "2025-06-24T03:51:03Z"
  }
]
id
格式:
Default-<envGuid>.<flowGuid>
,按第一个
.
分割即可得到
environmentName
flowName
triggerUrl
tags
是可选字段。部分条目数据较少(仅包含
id
+
monitor
)——请跳过没有
displayName
的条目。
list_store_flows
返回的标签是从流的
description
字段自动提取的(制作者添加的话题标签,例如
#operations
)。通过
update_store_flow(tags=...)
写入的标签会单独存储,仅在
get_store_flow
接口可见,不会出现在列表响应中。

get_store_flow

get_store_flow

Full cached record. Key fields:
CategoryFields
Identity
name
,
displayName
,
environmentName
,
state
,
triggerType
,
triggerKind
,
tier
,
sharingType
Run stats
runPeriodTotal
,
runPeriodFails
,
runPeriodSuccess
,
runPeriodFailRate
,
runPeriodSuccessRate
,
runPeriodDurationAverage
/
Max
/
Min
(milliseconds),
runTotal
,
runFails
,
runFirst
,
runLast
,
runToday
Governance
monitor
(bool),
rule_notify_onfail
(bool),
rule_notify_onmissingdays
(number),
rule_notify_email
(string),
log_notify_onfail
(ISO),
description
,
tags
Freshness
scanned
(ISO),
nextScan
(ISO)
Lifecycle
deleted
(bool),
deletedTime
(ISO)
JSON strings
actions
,
connections
,
owners
,
complexity
,
definition
,
createdBy
,
security
,
triggers
,
referencedResources
,
runError
— all require
json.loads()
to parse
Duration fields (
runPeriodDurationAverage
,
Max
,
Min
) are in milliseconds. Divide by 1000 for seconds.
runError
contains the last run error as a JSON string. Parse it:
json.loads(record["runError"])
— returns
{}
when no error.
完整的缓存记录,关键字段:
分类字段
标识信息
name
,
displayName
,
environmentName
,
state
,
triggerType
,
triggerKind
,
tier
,
sharingType
运行统计
runPeriodTotal
,
runPeriodFails
,
runPeriodSuccess
,
runPeriodFailRate
,
runPeriodSuccessRate
,
runPeriodDurationAverage
/
Max
/
Min
(毫秒),
runTotal
,
runFails
,
runFirst
,
runLast
,
runToday
治理信息
monitor
(布尔值),
rule_notify_onfail
(布尔值),
rule_notify_onmissingdays
(数字),
rule_notify_email
(字符串),
log_notify_onfail
(ISO格式时间),
description
,
tags
新鲜度
scanned
(ISO格式时间),
nextScan
(ISO格式时间)
生命周期
deleted
(布尔值),
deletedTime
(ISO格式时间)
JSON字符串字段
actions
,
connections
,
owners
,
complexity
,
definition
,
createdBy
,
security
,
triggers
,
referencedResources
,
runError
—— 所有字段都需要使用
json.loads()
解析
时长字段(
runPeriodDurationAverage
Max
Min
)单位为毫秒,除以1000即可得到秒数。
runError
包含最近一次运行错误的JSON字符串,解析方式:
json.loads(record["runError"])
——无错误时返回
{}

get_store_flow_summary

get_store_flow_summary

Aggregated stats over a time window (default: last 7 days).
json
{
  "flowKey": "Default-<envGuid>.<flowGuid>",
  "windowStart": null,
  "windowEnd": null,
  "totalRuns": 82,
  "successRuns": 81,
  "failRuns": 1,
  "successRate": 0.988,
  "failRate": 0.012,
  "averageDurationSeconds": 2.877,
  "maxDurationSeconds": 9.433,
  "firstFailRunRemediation": null,
  "firstFailRunUrl": null
}
Returns all zeros when no run data exists for this flow in the window. Use
startTime
and
endTime
(ISO 8601) parameters to change the window.
指定时间窗口内的聚合统计数据(默认:最近7天)。
json
{
  "flowKey": "Default-<envGuid>.<flowGuid>",
  "windowStart": null,
  "windowEnd": null,
  "totalRuns": 82,
  "successRuns": 81,
  "failRuns": 1,
  "successRate": 0.988,
  "failRate": 0.012,
  "averageDurationSeconds": 2.877,
  "maxDurationSeconds": 9.433,
  "firstFailRunRemediation": null,
  "firstFailRunUrl": null
}
如果该时间窗口内没有流的运行数据,所有字段返回0。可以使用
startTime
endTime
(ISO 8601格式)参数修改时间窗口。

get_store_flow_runs
/
get_store_flow_errors

get_store_flow_runs
/
get_store_flow_errors

Direct array.
get_store_flow_errors
filters to
status=Failed
only. Parameters:
startTime
,
endTime
,
status
(array:
["Failed"]
,
["Succeeded"]
, etc.).
Both return
[]
when no run data exists.
直接返回数组,
get_store_flow_errors
仅筛选
status=Failed
的记录。支持参数:
startTime
endTime
status
(数组:
["Failed"]
["Succeeded"]
等)。
没有运行数据时两个接口都返回
[]

get_store_flow_trigger_url

get_store_flow_trigger_url

json
{
  "flowKey": "Default-<envGuid>.<flowGuid>",
  "displayName": "Stripe subscription updated",
  "triggerType": "Request",
  "triggerKind": "Http",
  "triggerUrl": "https://..."
}
triggerUrl
is null for non-HTTP triggers.
json
{
  "flowKey": "Default-<envGuid>.<flowGuid>",
  "displayName": "Stripe subscription updated",
  "triggerType": "Request",
  "triggerKind": "Http",
  "triggerUrl": "https://..."
}
非HTTP触发器的
triggerUrl
为null。

set_store_flow_state

set_store_flow_state

Calls the live PA API then syncs state to the cache and returns the full updated record.
json
{
  "flowKey": "Default-<envGuid>.<flowGuid>",
  "requestedState": "Stopped",
  "currentState": "Stopped",
  "flow": { /* full gFlows record, same shape as get_store_flow */ }
}
The embedded
flow
object reflects the new state immediately — no follow-up
get_store_flow
call needed. Useful for governance workflows that stop a flow and then read its tags/monitor/owner metadata in the same turn.
Functionally equivalent to
set_live_flow_state
for changing state, but
set_live_flow_state
only returns
{flowName, environmentName, requestedState, actualState}
and doesn't sync the cache. Prefer
set_live_flow_state
when you only need to toggle state and don't care about cache freshness.
调用实时PA API,然后将状态同步到缓存,返回完整的更新后记录。
json
{
  "flowKey": "Default-<envGuid>.<flowGuid>",
  "requestedState": "Stopped",
  "currentState": "Stopped",
  "flow": { /* 完整的gFlows记录,结构和get_store_flow相同 */ }
}
内嵌的
flow
对象会立即反映新状态——无需后续调用
get_store_flow
。适合需要停止流后在同一次交互中读取其标签/监控状态/所有者元数据的治理工作流。
更改状态的功能与
set_live_flow_state
等效,但
set_live_flow_state
仅返回
{flowName, environmentName, requestedState, actualState}
且不会同步缓存。如果仅需要切换流状态,不关心缓存新鲜度,优先使用
set_live_flow_state

update_store_flow

update_store_flow

Updates governance metadata. Only provided fields are updated (merge). Returns the full updated record (same shape as
get_store_flow
).
Settable fields:
monitor
(bool),
rule_notify_onfail
(bool),
rule_notify_onmissingdays
(number, 0=disabled),
rule_notify_email
(comma-separated),
description
,
tags
,
businessImpact
,
businessJustification
,
businessValue
,
ownerTeam
,
ownerBusinessUnit
,
supportGroup
,
supportEmail
,
critical
(bool),
tier
,
security
.
更新治理元数据,仅更新提供的字段(合并更新)。返回完整的更新后记录(结构与
get_store_flow
相同)。
可设置字段:
monitor
(布尔值)、
rule_notify_onfail
(布尔值)、
rule_notify_onmissingdays
(数字,0=禁用)、
rule_notify_email
(逗号分隔)、
description
tags
businessImpact
businessJustification
businessValue
ownerTeam
ownerBusinessUnit
supportGroup
supportEmail
critical
(布尔值)、
tier
security

list_store_environments

list_store_environments

Direct array.
json
[
  {
    "id": "Default-26e65220-...",
    "displayName": "Flow Studio (default)",
    "sku": "Default",
    "type": "NotSpecified",
    "location": "australia",
    "isDefault": true,
    "isAdmin": true,
    "isManagedEnvironment": false,
    "createdTime": "2017-01-18T01:06:46Z"
  }
]
sku
values:
Default
,
Production
,
Developer
,
Sandbox
,
Teams
.
直接返回数组。
json
[
  {
    "id": "Default-26e65220-...",
    "displayName": "Flow Studio (default)",
    "sku": "Default",
    "type": "NotSpecified",
    "location": "australia",
    "isDefault": true,
    "isAdmin": true,
    "isManagedEnvironment": false,
    "createdTime": "2017-01-18T01:06:46Z"
  }
]
sku
取值:
Default
Production
Developer
Sandbox
Teams

list_store_connections

list_store_connections

Direct array. Can be very large (1500+ items).
json
[
  {
    "id": "<environmentId>.<connectionId>",
    "displayName": "user@contoso.com",
    "createdBy": "{\"id\":\"...\",\"displayName\":\"...\",\"email\":\"...\"}",
    "environmentName": "...",
    "statuses": "[{\"status\":\"Connected\"}]"
  }
]
createdBy
and
statuses
are JSON strings — parse with
json.loads()
.
直接返回数组,数据量可能很大(1500+条)。
json
[
  {
    "id": "<environmentId>.<connectionId>",
    "displayName": "user@contoso.com",
    "createdBy": "{\"id\":\"...\",\"displayName\":\"...\",\"email\":\"...\"}",
    "environmentName": "...",
    "statuses": "[{\"status\":\"Connected\"}]"
  }
]
createdBy
statuses
JSON字符串——使用
json.loads()
解析。

list_store_makers

list_store_makers

Direct array.
json
[
  {
    "id": "09dbe02f-...",
    "displayName": "Catherine Han",
    "mail": "catherine.han@flowstudio.app",
    "deleted": false,
    "ownerFlowCount": 199,
    "ownerAppCount": 209,
    "userIsServicePrinciple": false
  }
]
Deleted makers have
deleted: true
and no
displayName
/
mail
fields.
直接返回数组。
json
[
  {
    "id": "09dbe02f-...",
    "displayName": "Catherine Han",
    "mail": "catherine.han@flowstudio.app",
    "deleted": false,
    "ownerFlowCount": 199,
    "ownerAppCount": 209,
    "userIsServicePrinciple": false
  }
]
已删除的制作者
deleted: true
,且没有
displayName
/
mail
字段。

get_store_maker

get_store_maker

Full maker record. Key fields:
displayName
,
mail
,
userPrincipalName
,
ownerFlowCount
,
ownerAppCount
,
accountEnabled
,
deleted
,
country
,
firstFlow
,
firstFlowCreatedTime
,
lastFlowCreatedTime
,
firstPowerApp
,
lastPowerAppCreatedTime
,
licenses
(JSON string of M365 SKUs).
完整的制作者记录,关键字段:
displayName
mail
userPrincipalName
ownerFlowCount
ownerAppCount
accountEnabled
deleted
country
firstFlow
firstFlowCreatedTime
lastFlowCreatedTime
firstPowerApp
lastPowerAppCreatedTime
licenses
(M365 SKU的JSON字符串)。

list_store_power_apps

list_store_power_apps

Direct array.
json
[
  {
    "id": "<environmentId>.<appId>",
    "displayName": "My App",
    "environmentName": "...",
    "ownerId": "09dbe02f-...",
    "ownerName": "Catherine Han",
    "appType": "Canvas",
    "sharedUsersCount": 0,
    "createdTime": "2023-08-18T01:06:22Z",
    "lastModifiedTime": "2023-08-18T01:06:22Z",
    "lastPublishTime": "2023-08-18T01:06:22Z"
  }
]

直接返回数组。
json
[
  {
    "id": "<environmentId>.<appId>",
    "displayName": "My App",
    "environmentName": "...",
    "ownerId": "09dbe02f-...",
    "ownerName": "Catherine Han",
    "appType": "Canvas",
    "sharedUsersCount": 0,
    "createdTime": "2023-08-18T01:06:22Z",
    "lastModifiedTime": "2023-08-18T01:06:22Z",
    "lastPublishTime": "2023-08-18T01:06:22Z"
  }
]

Common Workflows

常见工作流

Find unhealthy flows

查找不健康的流

1. list_store_flows
2. Filter where runPeriodFailRate > 0.1 and runPeriodTotal >= 5
3. Sort by runPeriodFailRate descending
4. For each: get_store_flow for full detail
1. 调用list_store_flows
2. 筛选runPeriodFailRate > 0.1且runPeriodTotal >= 5的流
3. 按runPeriodFailRate降序排序
4. 对每个流调用get_store_flow获取完整详情

Check a specific flow's health

检查指定流的健康状态

1. get_store_flow → check scanned (freshness), runPeriodFailRate, runPeriodTotal
2. get_store_flow_summary → aggregated stats with optional time window
3. get_store_flow_errors → per-run failure detail with remediation hints
4. If deeper diagnosis needed → switch to live tools:
   get_live_flow_runs → get_live_flow_run_action_outputs
1. 调用get_store_flow → 检查scanned(数据新鲜度)、runPeriodFailRate、runPeriodTotal
2. 调用get_store_flow_summary → 可选指定时间窗口获取聚合统计数据
3. 调用get_store_flow_errors → 获取每次运行的失败详情和修复建议
4. 如果需要深度诊断 → 切换到实时工具:
   调用get_live_flow_runs → 调用get_live_flow_run_action_outputs

Enable monitoring on a flow

为流启用监控

1. update_store_flow with monitor=true
2. Optionally set rule_notify_onfail=true, rule_notify_email="user@domain.com"
3. Run data will appear after the next daily scan
1. 调用update_store_flow设置monitor=true
2. 可选设置rule_notify_onfail=true、rule_notify_email="user@domain.com"
3. 下次每日扫描后运行数据就会显示

Daily health check

每日健康检查

1. list_store_flows
2. Flag flows with runPeriodFailRate > 0.2 and runPeriodTotal >= 3
3. Flag monitored flows with state="Stopped" (may indicate auto-suspension)
4. For critical failures → get_store_flow_errors for remediation hints
1. 调用list_store_flows
2. 标记runPeriodFailRate > 0.2且runPeriodTotal >= 3的流
3. 标记state="Stopped"的已监控流(可能表示自动暂停)
4. 针对严重失败 → 调用get_store_flow_errors获取修复建议

Maker audit

制作者审计

1. list_store_makers
2. Identify deleted accounts still owning flows (deleted=true, ownerFlowCount > 0)
3. get_store_maker for full detail on specific users
1. 调用list_store_makers
2. 识别仍然拥有流的已删除账户(deleted=true且ownerFlowCount > 0)
3. 对特定用户调用get_store_maker获取完整详情

Inventory

资产清点

1. list_store_environments → environment count, SKUs, locations
2. list_store_flows → flow count by state, trigger type, fail rate
3. list_store_power_apps → app count, owners, sharing
4. list_store_connections → connection count per environment

1. 调用list_store_environments → 环境数量、SKU、位置
2. 调用list_store_flows → 按状态、触发器类型、失败率统计流数量
3. 调用list_store_power_apps → 应用数量、所有者、共享情况
4. 调用list_store_connections → 每个环境的连接数量

Related Skills

相关技能

  • power-automate-mcp
    — Core connection setup, live tool reference
  • power-automate-debug
    — Deep diagnosis with action-level inputs/outputs (live API)
  • power-automate-build
    — Build and deploy flow definitions
  • power-automate-governance
    — Governance metadata, tagging, notification rules, CoE patterns
  • power-automate-mcp
    — 核心连接配置、实时工具参考
  • power-automate-debug
    — 操作级输入/输出深度诊断(实时API)
  • power-automate-build
    — 构建和部署流定义
  • power-automate-governance
    — 治理元数据、标签、通知规则、卓越中心模式