Scaffold a cloud flow (experimental)
cs_add_flowAdd a callable flow to a Copilot Studio agent by generating workflow files with an agent-call trigger and response. Preview changes first, then confirm to write.
Instructions
EXPERIMENTAL: write workflows//metadata.yaml + workflow.json for a flow with the 'when an agent calls the flow' trigger and a response, optionally exposing it as a tool. Format follows the schema's CloudFlowDefinition and the Power Automate solution JSON; verify with cs_pack and in the portal after push. The first call changes nothing: it returns the files it would write, as a diff against what is there now, for the user to approve. Call it again with the same arguments plus confirm: true to write them.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| inputs | No | ||
| actions | No | Extra Power Automate actions (name -> definition) inserted before the response | |
| addTool | No | Also create actions/<name>.mcs.yml invoking this flow | |
| confirm | No | Required to write the change to the file. Without it the tool returns a preview - the changed lines against the current ones, and the character count - and writes nothing. | |
| outputs | No | ||
| overwrite | No | ||
| workspace | No | Path to (or inside) the agent workspace. Defaults to CPS_WORKSPACE or the current directory. | |
| description | No |