agentleFS
korchard333korchard333/claude-power-platform-community/.claude/skills/power-automate/SKILL.md

power-automate

Skill46 starsChanged 8 months agoMITView on GitHub

Power Automate Cloud Flows. Use when: designing flows, error handling (scope try/catch), triggers, Dataverse actions, Apply to Each performance, child flows, HTTP connector, expressions, approval flows, Teams Adaptive Cards, desktop flows (RPA).

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 6 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Error handling first: Add try/catch scope before writing the happy path

    line 16
  2. Distinctive:

    Minimal permissions: Use service principal connections for production

    line 17
  3. Distinctive:

    No hardcoded IDs: Use environment variables or dynamic lookups

    line 18
  4. Distinctive:

    Solution-aware: Every production flow must be inside a solution

    line 20
  5. Distinctive:

    Before writing flow definitions programmatically, verify patterns using the MS Learn MCP tools:

    line 55
  6. Distinctive:

    No retry policy on HTTP actions

    line 86

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Skill: Power Automate Cloud Flows

When to Use

Trigger when designing, building, reviewing, or debugging Power Automate cloud flows.


Flow Design Principles

  1. Idempotent flows: Re-running the same trigger should produce the same result
  2. Error handling first: Add try/catch scope before writing the happy path
  3. Minimal permissions: Use service principal connections for production
  4. No hardcoded IDs: Use environment variables or dynamic lookups
  5. Name every action: Descriptive action names are your documentation
  6. Solution-aware: Every production flow must be inside a solution

When to Use Power Automate vs Alternatives

ScenarioRecommendedWhy
React to Dataverse record changesPower AutomateNative trigger with filtering columns
Complex business logic on savePlugin (C#)Runs synchronously in transaction pipeline
Reusable API callable from multiple appsCustom APIRegistered in Dataverse, callable via Web API
Scheduled batch processingPower AutomateRecurrence trigger + pagination
Real-time validation before savePlugin (C#)Pre-operation stage, can throw to block save
External system integration (async)Power AutomateHTTP connector with retry policies
External system integration (sync)Custom ConnectorWhen response needed immediately
UI automation (no API available)Desktop FlowPower Automate Desktop with cloud orchestration

Solution-Aware Flow Checklist

  • Flow is inside a solution (not "My Flows")
  • All connections use Connection References
  • All hardcoded URLs/IDs use Environment Variables
  • Flow has error handling scope (try/catch)
  • Flow name follows convention: [Solution] - [Trigger] - [Action]
  • Run-only permissions configured if shared
  • Trigger conditions set to avoid unnecessary runs
  • Concurrency controls set on Apply to Each loops
  • Action retry policies configured for external calls

⚠️ Verify Flow Patterns Against MS Learn

Before writing flow definitions programmatically, verify patterns using the MS Learn MCP tools:

  1. microsoft_docs_search("power automate [your pattern]") — quick overview
  2. microsoft_docs_fetch(url) — full page detail
  3. microsoft_code_sample_search("power automate [pattern]") — working examples

Skill files are battle-tested but can contain errors. If MS docs contradict what's in the skill file, trust MS docs and flag the discrepancy.


⚠️ REQUIRED: Load Sub-Files Before Implementation

SKILL.md is a summary only — it is NOT sufficient for implementation.

The detailed content (complete payloads, XML templates, working examples, edge-case handling) lives in sub-files in the same directory as this SKILL.md. Before writing any code, you MUST use read_file on the sub-files relevant to your task:

  • Error Handling — Scope-based try/catch/finally pattern, error notification, cleanup actions
  • Triggers — Trigger selection, Dataverse filtering columns, trigger conditions (OData expressions)
  • Dataverse Actions & Performance — Native connector actions, OData filters, Apply to Each concurrency, child flows, pagination pattern, performance profiles
  • Expressions & HTTP Connector — Null-safe access, date formatting, JSON parsing, HTTP resilient pattern with retry policies
  • Approvals & Teams Adaptive Cards — Approval flow pattern, Teams card posting, email notification sync, approval types
  • Desktop Flows (RPA) — When to use RPA, execution modes, cloud-to-desktop integration, best practices
  • Agent Flows — Agent Flows (AI-native automation), generative actions, Automation Center governance, autonomous agent patterns
  • Flow Creation via Web API — Programmatic flow creation, activation, and monitoring via Dataverse Web API: clientdata structure, trigger types, connection reference wiring, activation latency, run monitoring via flowruns entity

Anti-Patterns

  • Flows outside of solutions ("My Flows") — can't be promoted via ALM
  • Dataverse calls inside unbounded Apply to Each (no concurrency limit)
  • Personal connections instead of connection references
  • Missing error handling (no try/catch scope)
  • No retry policy on HTTP actions
  • Hardcoded GUIDs, URLs, or environment-specific values
  • Using "Send an HTTP request to Dataverse" when a native action exists
  • Apply to Each with >1000 items and no pagination strategy
  • Approval flows with Teams cards AND email notifications enabled simultaneously (card won't sync)
  • Using desktop flows when a cloud connector exists for the same system

Related Skills

  • dataverse — Schema design for tables that flows operate on
  • code-apps — Triggering flows from Code Apps via Custom API or Dataverse record triggers
  • custom-connectors — Building connectors for external APIs used in flows
  • alm — Solution packaging, connection references, environment variables for flow deployment
  • plugins — Alternative to flows for synchronous, transactional Dataverse logic

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.