Powerplatform
Generate Power Automate flows from natural language. Reads connector schemas from work repo, outputs deployable solution files. USE WHEN user says 'create flow', 'power automate', 'automate workflow', or describes a business process to automate.
What this skill does
# PowerPlatform - Flow Generation Skill
Generate Power Automate flows from natural language descriptions using connector schemas exported from your work environment.
## Examples
**Example: Simple notification flow**
**Example: Approval workflow**
```
User: "Make a flow for document approval - when a file is added to SharePoint, start an approval, then move to approved/rejected folder"
-> Uses SharePoint trigger + Approvals + SharePoint actions
-> Includes conditional branching
-> Outputs deployable solution
```
---
## Architecture
```
Work Repo (schemas) PAI (this skill)
~/Projects/work/scripts/ ~/.claude/skills/PowerPlatform/
power-platform/
├── connectors/ ──reads──> ├── SKILL.md
│ ├── shared_teams.json ├── templates/
│ ├── shared_outlook.json ├── reference/
│ └── ... └── examples/
├── manifest.json
└── generated/ <──writes── [Solution ZIPs]
```
---
## Workflow
### 1. Check Available Connectors
Before generating, read the manifest to see what connectors are available:
```bash
cat ~/Projects/work/scripts/power-platform/manifest.json
```
If `manifest.json` doesn't exist or is stale, inform user to run the export script at work.
### 2. Parse User Request
Extract from natural language:
- **Trigger**: What starts the flow (email arrives, file created, scheduled, manual)
- **Actions**: What the flow does (send message, create item, update record)
- **Conditions**: Any branching logic (if/then, switch)
- **Data flow**: What data passes between steps
### 3. Generate Flow Definition
Create the flow JSON following Power Automate schema. Key structure:
```json
{
"properties": {
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"triggers": { ... },
"actions": { ... }
},
"connectionReferences": { ... }
}
}
```
### 4. Package as Solution
Wrap in solution structure for import:
```
solution/
├── [Content_Types].xml
├── customizations.xml
├── solution.xml
└── Workflows/
└── {flow-guid}-{flow-name}.json
```
### 5. Output
Save to: `~/Projects/work/scripts/power-platform/generated/`
---
## Connection References
Flows use **connection references** that map to actual connections in the target environment. Use placeholder IDs that will be resolved on import:
```json
"connectionReferences": {
"shared_teams": {
"connectionName": "shared_teams",
"source": "Embedded",
"id": "/providers/Microsoft.PowerApps/apis/shared_teams",
"tier": "NotSpecified"
}
}
```
On import, Power Platform prompts user to map these to their actual connections.
---
## Expression Syntax
Power Automate uses a specific expression language. Common patterns:
### Dynamic Content References
```
@{triggerOutputs()?['body/subject']} # Email subject from trigger
@{body('Get_item')?['Title']} # Field from previous action
@{items('Apply_to_each')?['name']} # Current item in loop
```
### Functions
```
@{utcNow()} # Current timestamp
@{concat('Hello ', triggerBody()?['name'])} # String concatenation
@{if(equals(1,1),'yes','no')} # Conditional
@{length(body('Get_items')?['value'])} # Array length
@{formatDateTime(utcNow(),'yyyy-MM-dd')} # Date formatting
```
### Conditions
```json
"expression": {
"and": [
{ "contains": ["@triggerOutputs()?['body/subject']", "urgent"] },
{ "equals": ["@triggerOutputs()?['body/importance']", "high"] }
]
}
```
See `reference/expressions.md` for full syntax guide.
---
## Common Triggers
| Trigger | Connector | Use Case |
|---------|-----------|----------|
| `When_a_new_email_arrives` | Office365 | Email automation |
| `When_a_file_is_created` | SharePoint | Document workflows |
| `When_an_item_is_created` | SharePoint | List automation |
| `When_a_row_is_added` | Dataverse | Database triggers |
| `Recurrence` | Schedule | Scheduled jobs |
| `manual` | Manual | Button-triggered |
| `When_a_HTTP_request_is_received` | HTTP | Webhook/API trigger |
---
## Common Actions
| Action | Connector | Use Case |
|--------|-----------|----------|
| `Send_an_email` | Office365 | Email notifications |
| `Post_message_in_a_chat_or_channel` | Teams | Team notifications |
| `Create_item` | SharePoint | Add list items |
| `Update_item` | SharePoint | Modify list items |
| `Start_and_wait_for_an_approval` | Approvals | Approval workflows |
| `Create_a_row` | Dataverse | Database writes |
| `HTTP` | HTTP | External API calls |
---
## Templates
Pre-built patterns in `templates/`:
- `approval-flow.json` - Standard approval workflow
- `notification-flow.json` - Event-triggered notifications
- `scheduled-report.json` - Scheduled data collection
- `form-processing.json` - Forms response handling
- `file-sync.json` - Cross-system file operations
---
## Generation Process
When asked to create a flow:
1. **Read available schemas**:
```bash
ls ~/Projects/work/scripts/power-platform/connectors/
cat ~/Projects/work/scripts/power-platform/manifest.json
```
2. **Load relevant connector schemas** for the requested functionality
3. **Select appropriate template** or build from scratch
4. **Generate flow JSON** with:
- Unique GUID for flow
- Proper trigger configuration
- Action sequence with correct operation IDs
- Connection references for all connectors used
- Expression syntax for dynamic content
5. **Create solution package** using `tools/package-solution.sh`
6. **Save to generated folder** and inform user
---
## Limitations
- **Cannot deploy directly** - User must import at work
- **Connection mapping required** - User maps connections on import
- **Premium connectors** - Some require premium licenses
- **Custom connectors** - Not supported without schema export
- **Schema freshness** - Depends on export frequency at work
---
## Files Reference
| File | Purpose |
|------|---------|
| `templates/*.json` | Pre-built flow patterns |
| `reference/expressions.md` | Expression syntax guide |
| `reference/triggers.md` | Trigger configurations |
| `reference/actions.md` | Action configurations |
| `examples/*.json` | Working example flows |
| `tools/package-solution.sh` | Solution packager script |
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.