Turn a cloud flow on or off
cs_set_flow_stateSwitch a Copilot Studio flow between Activated and Draft states. Use it to turn on a flow after binding its connection references or turn it off to stop it from running.
Instructions
Switch a flow on (Activated) or off (Draft). This is the step a solution import leaves for you: flows whose connection references were unbound at import time land switched off. A flow can only be turned on once its connections are bound and its definition is valid. Changes a live environment: requires confirm: true.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| state | Yes | on = Activated, off = Draft | |
| flowId | Yes | Flow (workflow) id | |
| confirm | No | Required to actually perform a change in a live environment. Without it the tool returns a dry run. | |
| clientId | No | Entra app (client) id for MSAL. Defaults to CPS_CLIENT_ID, then the first-party VS Code id. | |
| 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. | |
| 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. |