Add an event trigger
cs_add_triggerCreate a trigger YAML file that links a cloud flow to start a Copilot Studio agent. Preview changes as a diff first, then confirm to write them.
Instructions
Create trigger/.trigger.mcs.yml pointing at a cloud flow that starts the agent (WorkflowExternalTrigger). 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 | ||
| flowId | Yes | ||
| 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. | |
| overwrite | No | ||
| workspace | No | Path to (or inside) the agent workspace. Defaults to CPS_WORKSPACE or the current directory. | |
| description | No |