Create a cloud flow
cs_create_flowCreate a Power Automate cloud flow from a step spec or ready-made definition, optionally into a solution. The flow starts disabled until connection references are bound and activated.
Instructions
Create a new Power Automate cloud flow, from a step spec (see cs_build_flow_definition: trigger plus connector, HTTP, condition, loop, variable and response steps) or from a ready-made definition, optionally straight into a solution. The flow is created switched off, because a flow can only be activated once its connection references are bound: bind them, then cs_set_flow_state on. To let an agent call it, use a trigger of type Request/kind Skills and add it as a tool with cs_add_tool type 'flow'. Changes a live environment: requires confirm: true.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Flow display name | |
| steps | No | Steps in order; each waits for the previous one to succeed | |
| confirm | No | Required to actually perform a change in a live environment. Without it the tool returns a dry run. | |
| outputs | No | What the flow answers with (agent-callable and HTTP flows) | |
| trigger | No | Default: 'agent' (When an agent calls the flow) | |
| clientId | No | Entra app (client) id for MSAL. Defaults to CPS_CLIENT_ID, then the first-party VS Code id. | |
| solution | No | Unique name of the solution to create it in | |
| tenantId | No | Entra tenant id. Defaults to the workspace sync metadata, then CPS_TENANT_ID. | |
| workspace | No | Path to (or inside) the agent workspace. Defaults to CPS_WORKSPACE or the current directory. | |
| clientData | No | The whole clientdata document, when you have one (from cs_get_flow of another flow, for example) | |
| definition | No | A ready-made Power Automate definition, instead of steps | |
| description | No | ||
| dataverseUrl | No | Dataverse URL; default: from the workspace or the environment | |
| environmentId | No | Power Platform environment id (GUID). Defaults to workspace sync metadata or CPS_ENVIRONMENT_ID. | |
| connectionReferences | No | properties.connectionReferences, when you pass a definition rather than steps | |
| connectionReferencePrefix | No | Prefix for generated connection reference names, usually your publisher prefix |