feat: add flowstudio-power-automate-debug and flowstudio-power-automate-build skills#899
feat: add flowstudio-power-automate-debug and flowstudio-power-automate-build skills#899ninihen1 wants to merge 2 commits intogithub:stagedfrom
Conversation
…te-build skills Two companion skills for the FlowStudio Power Automate MCP server: - flowstudio-power-automate-debug: Debug workflow for failed Power Automate cloud flow runs - flowstudio-power-automate-build: Build & deploy flows from natural language descriptions Both require a FlowStudio MCP subscription: https://flowstudio.app These complement the existing flowstudio-power-automate-mcp skill (merged in PR github#896).
There was a problem hiding this comment.
Pull request overview
Adds two companion Agent Skills to support FlowStudio’s Power Automate MCP server: one focused on diagnosing failed flow runs and one focused on scaffolding/building/deploying flow definitions. This complements the existing flowstudio-power-automate-mcp skill by providing end-to-end “debug” and “build” playbooks plus bundled reference templates.
Changes:
- Introduces
flowstudio-power-automate-debugskill with a step-by-step debugging workflow and common error catalog. - Introduces
flowstudio-power-automate-buildskill with build/deploy workflow guidance and extensive bundled reference templates (schema, triggers, action patterns). - Adds multiple reference markdown files intended for copy/paste into Power Automate flow definitions.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| skills/flowstudio-power-automate-debug/SKILL.md | Main debugging skill guide and runnable Python examples for diagnosing failures via FlowStudio MCP tools. |
| skills/flowstudio-power-automate-debug/references/debug-workflow.md | Decision-tree style debugging workflow reference. |
| skills/flowstudio-power-automate-debug/references/common-errors.md | Catalog of common Power Automate error codes with diagnosis/fix guidance. |
| skills/flowstudio-power-automate-build/SKILL.md | Main build/deploy skill guide (connections, definition construction, deploy, testing). |
| skills/flowstudio-power-automate-build/references/trigger-types.md | Copy/paste trigger templates (Recurrence, Request, SharePoint, Outlook, etc.). |
| skills/flowstudio-power-automate-build/references/flow-schema.md | Reference for the flow definition JSON structure expected by update_live_flow. |
| skills/flowstudio-power-automate-build/references/build-patterns.md | Full example flow definition patterns. |
| skills/flowstudio-power-automate-build/references/action-patterns-data.md | Data transform patterns (select/filter/query, HTTP, parse, CSV tricks, etc.). |
| skills/flowstudio-power-automate-build/references/action-patterns-core.md | Core patterns (variables, control flow, expressions, scopes, foreach, etc.). |
| skills/flowstudio-power-automate-build/references/action-patterns-connectors.md | Connector-specific patterns (SharePoint/Outlook/Teams/Approvals). |
| out = mcp("get_live_flow_run_action_outputs", | ||
| environmentName=ENV, | ||
| flowName=FLOW_ID, | ||
| runName=RUN_ID, | ||
| actionName=action_name) |
There was a problem hiding this comment.
get_live_flow_run_action_outputs returns an array (even when querying a single action). This example treats the result as an object (out.get(...)), which will raise at runtime when copy-pasted. Index the first element (or handle an empty array) before reading status/outputs.
| out = mcp("get_live_flow_run_action_outputs", | |
| environmentName=ENV, | |
| flowName=FLOW_ID, | |
| runName=RUN_ID, | |
| actionName=action_name) | |
| out_list = mcp("get_live_flow_run_action_outputs", | |
| environmentName=ENV, | |
| flowName=FLOW_ID, | |
| runName=RUN_ID, | |
| actionName=action_name) | |
| if not out_list: | |
| print(action_name, "no outputs returned") | |
| continue | |
| out = out_list[0] |
| # Example: action uses split(item()?['Name'], ' ') | ||
| # → null Name in the source data | ||
| outputs = mcp("get_live_flow_run_action_outputs", ..., actionName="Compose_Names") | ||
| names = outputs["outputs"]["body"] # check for nulls in the body array |
There was a problem hiding this comment.
get_live_flow_run_action_outputs returns an array of action objects; this snippet treats it as a dict (outputs["outputs"]["body"]). Adjust to read from the first array element (and handle the empty-array case) so the null-check example works.
| names = outputs["outputs"]["body"] # check for nulls in the body array | |
| if not outputs: | |
| print("No action outputs returned for Compose_Names") | |
| names = [] | |
| else: | |
| first_action = outputs[0] | |
| # check for nulls in the body array | |
| names = first_action.get("outputs", {}).get("body") or [] |
| --- | ||
| name: flowstudio-power-automate-build | ||
| description: >- | ||
| Build, scaffold, and deploy Power Automate cloud flows using the FlowStudio | ||
| MCP server. Load this skill when asked to: create a flow, build a new flow, | ||
| deploy a flow definition, scaffold a Power Automate workflow, construct a flow | ||
| JSON, update an existing flow's actions, patch a flow definition, add actions | ||
| to a flow, wire up connections, or generate a workflow definition from scratch. | ||
| Requires a FlowStudio MCP subscription — see https://mcp.flowstudio.app | ||
| --- |
There was a problem hiding this comment.
This new skill isn’t listed in docs/README.skills.md (the main skills index). Add an entry there so it’s discoverable alongside other skills.
| Array operations, HTTP calls, parsing, and data transformation patterns. | ||
|
|
||
| > All examples assume `"runAfter"` is set appropriately. | ||
| > Replace `<connectionName>` with the GUID from `connectionReferences`. |
There was a problem hiding this comment.
This header note says to replace <connectionName> with the GUID from connectionReferences, but for connector actions host.connectionName should be the key in the connectionReferences map (the GUID goes in the map value’s connectionName). This conflicts with action-patterns-core/connectors and will cause deploy errors if followed.
| > Replace `<connectionName>` with the GUID from `connectionReferences`. | |
| > Use `<connectionName>` as the key in `connectionReferences` (the GUID goes in the map value’s `connectionName`). |
| Formatted date: @formatDateTime(utcNow(), 'dd/MM/yyyy') | ||
| Add days: @addDays(utcNow(), 7) | ||
| Array length: @length(variables('myArray')) | ||
| Filter array: @array(filter(outputs('Get_Items')?['body/value'], item => equals(item?['Status'], 'Active'))) |
There was a problem hiding this comment.
Power Automate/Logic Apps expressions don’t support JavaScript-style arrow functions (item => ...). This “Filter array” example is not a valid WDL/Power Automate expression and will fail if used. Consider pointing readers to the Query (Filter array) action pattern, or provide a valid expression-only alternative if one exists.
| Filter array: @array(filter(outputs('Get_Items')?['body/value'], item => equals(item?['Status'], 'Active'))) | |
| Filter array: Use the **Query (Filter array)** action pattern (no arrow functions in expressions). |
aaronpowell
left a comment
There was a problem hiding this comment.
I think you missed committing the updated README with the new skills.
Also, given there's a few skills now, would a plugin also be of value?
…s, step numbering - Add skills to docs/README.skills.md (fixes validate-readme CI check) - Update cross-skill references to use flowstudio- prefix (github#1, github#4, github#7, github#9) - Fix get_live_flow_run_action_outputs: returns array, index [0] (github#2, github#3) - Renumber Step 6→5, Step 7→6 — remove gap in build workflow (github#8) - Fix connectionName note: it's the key, not the GUID (github#10) - Remove invalid arrow function from Filter array expression (github#11)
|
Thanks for the review, @aaronpowell! README ✅ FixedGood catch — Copilot Review — All 11 Comments Addressed ✅All verified against the live FlowStudio MCP server:
Plugin Suggestion ���Great idea! With 3 skills now, a |
|
Add the plugin to this PR rather than spinning up a new one |
Two companion skills for the FlowStudio Power Automate MCP server, complementing the existing
flowstudio-power-automate-mcpskill (merged in PR #896).New Skills
flowstudio-power-automate-debug
Debug workflow for failed Power Automate cloud flow runs. Guides the agent step-by-step through identifying the failing action, reading error details, and suggesting fixes using the FlowStudio MCP tools.
Trigger phrases: debug a flow, investigate a failed run, why is this flow failing, find the root cause of a flow error, troubleshoot
flowstudio-power-automate-build
Build & deploy Power Automate cloud flows from natural language descriptions. Includes action patterns, connector references, flow schema, and trigger types as bundled reference files.
Trigger phrases: create a flow, build a new flow, deploy a flow definition, scaffold a Power Automate workflow, generate a workflow definition
Validation
npm run skill:validate✅ (211 skills valid)npm run build✅User-Agent: FlowStudio-MCP/1.0in HTTP examples (required by Cloudflare)list_live_flowsresponse shape documented correctly as wrapper{flows:[...]}