Skip to content

feat: add flowstudio-power-automate-debug and flowstudio-power-automate-build skills#899

Open
ninihen1 wants to merge 2 commits intogithub:stagedfrom
ninihen1:add-power-automate-debug-build
Open

feat: add flowstudio-power-automate-debug and flowstudio-power-automate-build skills#899
ninihen1 wants to merge 2 commits intogithub:stagedfrom
ninihen1:add-power-automate-debug-build

Conversation

@ninihen1
Copy link
Contributor

@ninihen1 ninihen1 commented Mar 6, 2026

Two companion skills for the FlowStudio Power Automate MCP server, complementing the existing flowstudio-power-automate-mcp skill (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
  • Both skills include User-Agent: FlowStudio-MCP/1.0 in HTTP examples (required by Cloudflare)
  • list_live_flows response shape documented correctly as wrapper {flows:[...]}
  • Requires FlowStudio MCP subscription: https://flowstudio.app

…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).
@ninihen1 ninihen1 requested a review from aaronpowell as a code owner March 6, 2026 04:39
Copilot AI review requested due to automatic review settings March 6, 2026 04:39
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-debug skill with a step-by-step debugging workflow and common error catalog.
  • Introduces flowstudio-power-automate-build skill 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).

Comment on lines +186 to +190
out = mcp("get_live_flow_run_action_outputs",
environmentName=ENV,
flowName=FLOW_ID,
runName=RUN_ID,
actionName=action_name)
Copy link

Copilot AI Mar 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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]

Copilot uses AI. Check for mistakes.
# 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
Copy link

Copilot AI Mar 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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 []

Copilot uses AI. Check for mistakes.
Comment on lines +1 to +10
---
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
---
Copy link

Copilot AI Mar 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Array operations, HTTP calls, parsing, and data transformation patterns.

> All examples assume `"runAfter"` is set appropriately.
> Replace `<connectionName>` with the GUID from `connectionReferences`.
Copy link

Copilot AI Mar 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
> Replace `<connectionName>` with the GUID from `connectionReferences`.
> Use `<connectionName>` as the key in `connectionReferences` (the GUID goes in the map value’s `connectionName`).

Copilot uses AI. Check for mistakes.
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')))
Copy link

Copilot AI Mar 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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).

Copilot uses AI. Check for mistakes.
Copy link
Contributor

@aaronpowell aaronpowell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
@ninihen1
Copy link
Contributor Author

ninihen1 commented Mar 6, 2026

Thanks for the review, @aaronpowell!

README ✅ Fixed

Good catch — docs/README.skills.md is now included in the latest push. The validate-readme CI check should pass now.

Copilot Review — All 11 Comments Addressed ✅

All verified against the live FlowStudio MCP server:

# File Issue Fix
1,4,7,9 Both SKILL.md + Related Skills Cross-refs used power-automate-mcp instead of flowstudio- prefix Updated all references
2,3 debug SKILL.md get_live_flow_run_action_outputs returns array, code treated as dict Index [0] with empty-array guard
5,6 Both SKILL.md Missing from docs/README.skills.md Auto-generated by npm run build, now committed
8 build SKILL.md Step numbering jumps 4→6 Renumbered to 5,6
10 action-patterns-data.md connectionName note said GUID, should be map key Fixed: key in host.connectionName, GUID in value
11 action-patterns-core.md Invalid arrow function in Filter array expression Replaced with action reference

Plugin Suggestion ���

Great idea! With 3 skills now, a flowstudio-power-automate plugin would let users install the full toolkit in one go. Happy to add one in this PR or as a follow-up — let me know your preference.

@aaronpowell
Copy link
Contributor

Add the plugin to this PR rather than spinning up a new one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants