mirror of
https://github.com/github/awesome-copilot.git
synced 2026-05-03 21:55:55 +00:00
feat(flowstudio): align Power Automate skills with MCP server v1.1.6 (#1564)
Foundation skill (flowstudio-power-automate-mcp) rewritten to use the server's new tool_search and list_skills meta-tools (v1.1.5+) for discovery instead of cataloging every tool by hand. Cut from 519 to 295 lines. New "Which Skill to Use When" intent-keyed decision tree points at the four specialized skills. Build/debug/governance/monitoring updated for use-case framing. Tools that genuinely cross tiers (e.g. debug skill borrowing get_store_flow_summary) are correct when the workflow needs them — the split between skills is by use-case intent, not by tool partition. Build skill: new Step 3a Resolving Dynamic Connector Values covers get_live_dynamic_options outer-parameter auto-bridge (v1.1.6+) and the AadGraph user-picker fallback via shared_office365users.SearchUserV2 (replaces broken builtInOperation:AadGraph.GetUsers). Debug skill: Outlook user-picker failure note pointing at the fallback. Monitoring skill description disambiguates from the server's monitor-flow tool bundle (runtime control of a single flow) — this skill is tenant-wide health analytics over the cached store. All 5 skills validate via npm run skill:validate; line endings LF only; codespell clean; auto-regenerated docs/README.skills.md included.
This commit is contained in:
@@ -24,7 +24,7 @@ Step-by-step guide for constructing and deploying Power Automate cloud flows
|
||||
programmatically through the FlowStudio MCP server.
|
||||
|
||||
**Prerequisite**: A FlowStudio MCP server must be reachable with a valid JWT.
|
||||
See the `flowstudio-power-automate-mcp` skill for connection setup.
|
||||
See the `power-automate-mcp` skill for connection setup.
|
||||
Subscribe at https://mcp.flowstudio.app
|
||||
|
||||
---
|
||||
@@ -192,7 +192,7 @@ for connector in connectors_needed:
|
||||
> connection_references = ref_flow["properties"]["connectionReferences"]
|
||||
> ```
|
||||
|
||||
See the `flowstudio-power-automate-mcp` skill's **connection-references.md** reference
|
||||
See the `power-automate-mcp` skill's **connection-references.md** reference
|
||||
for the full connection reference structure.
|
||||
|
||||
---
|
||||
@@ -219,6 +219,59 @@ definition = {
|
||||
|
||||
---
|
||||
|
||||
## Step 3a — Resolving Dynamic Connector Values
|
||||
|
||||
When an action input needs a value picked from a connector dropdown (e.g. a
|
||||
SharePoint list ID, a Dataverse table name, a user's Azure AD UPN), use
|
||||
`get_live_dynamic_options` to resolve it via MCP rather than hardcoding GUIDs.
|
||||
|
||||
```python
|
||||
# Resolve a SharePoint list by site
|
||||
opts = mcp("get_live_dynamic_options",
|
||||
environmentName=ENV,
|
||||
connectorName="shared_sharepointonline",
|
||||
operationId="GetTables",
|
||||
parameters={"dataset": "https://contoso.sharepoint.com/sites/HR"})
|
||||
# opts["value"] → [{"Name": "<list-guid>", "DisplayName": "Employees"}, ...]
|
||||
```
|
||||
|
||||
> **Outer-parameter auto-bridge** (server v1.1.6+): you can pass arbitrary outer
|
||||
> parameters directly in `parameters` — the server now synthesizes the
|
||||
> `parameterReference` mapping that PA's listEnum requires. Before 1.1.6 you had
|
||||
> to declare `dynamicMetadata.parameters: {paramName: {parameterReference: "name"}}`
|
||||
> manually or get `IncorrectDynamicInvokeParameter`. This makes it practical to
|
||||
> invoke arbitrary connector operations through the dynamic-options pipeline
|
||||
> (e.g. `shared_office365users.SearchUserV2` for AAD user lookup).
|
||||
|
||||
### AadGraph user-picker fallback
|
||||
|
||||
For Outlook actions like `GetEmailsV3` (parameters `mailboxAddress`, `to`, `cc`,
|
||||
`from`), PA's listEnum uses `builtInOperation:AadGraph.GetUsers` — which is
|
||||
broken and returns `DynamicListValuesUndefinedOrInvalid` for every call.
|
||||
|
||||
`describe_live_connector` (v1.1.6+) detects these parameters and returns a
|
||||
structured `fallback` field on each affected parameter pointing at a working
|
||||
alternative. **Use `shared_office365users.SearchUserV2`** to resolve the same
|
||||
AAD user shape `{value: [{id, displayName, mail, userPrincipalName, ...}]}`:
|
||||
|
||||
```python
|
||||
# Borrow a shared_office365users connection (any active one will do)
|
||||
conn = next(c for c in conn_map if "office365users" in c)
|
||||
|
||||
users = mcp("get_live_dynamic_options",
|
||||
environmentName=ENV,
|
||||
connectorName="shared_office365users",
|
||||
connectionName=conn_map[conn], # see Step 2a
|
||||
operationId="SearchUserV2",
|
||||
parameters={"searchTerm": "john", "top": 10})
|
||||
# users["value"] → [{"Id": "...", "DisplayName": "John Smith", "Mail": "..."}, ...]
|
||||
```
|
||||
|
||||
Then plug the resolved `Mail` value into the Outlook action's parameter — no
|
||||
need to call `AadGraph.GetUsers` directly.
|
||||
|
||||
---
|
||||
|
||||
## Step 4 — Deploy (Create or Update)
|
||||
|
||||
`update_live_flow` handles both creation and updates in a single tool.
|
||||
@@ -403,7 +456,7 @@ if run["status"] == "Failed":
|
||||
root = err["failedActions"][-1]
|
||||
print(f"Root cause: {root['actionName']} → {root.get('code')}")
|
||||
# Debug and fix the definition before proceeding
|
||||
# See flowstudio-power-automate-debug skill for full diagnosis workflow
|
||||
# See power-automate-debug skill for full diagnosis workflow
|
||||
```
|
||||
|
||||
#### 7c — Swap to the production trigger
|
||||
@@ -475,5 +528,5 @@ The `body/recipient` parameter format depends on the `location` value:
|
||||
|
||||
## Related Skills
|
||||
|
||||
- `flowstudio-power-automate-mcp` — Core connection setup and tool reference
|
||||
- `flowstudio-power-automate-debug` — Debug failing flows after deployment
|
||||
- `power-automate-mcp` — Foundation skill: connection setup, MCP helper, tool discovery
|
||||
- `power-automate-debug` — Debug failing flows after deployment
|
||||
|
||||
Reference in New Issue
Block a user