Turn automation on or off
switch_automationTurn one automation on or off, as the On/Off switch of the automation in Taskade does. Get its id from list_automations. Without confirm: true nothing changes: the result says how the automation starts, how often, its steps, and what it spends or sends (AI steps spend credits, a step can send email or act in a connected app). Show that to the user, and call again with confirm: true only after the user says yes. To turn an automation on, it must be complete: if a part is missing, the result names it as a step in Taskade (for example "Connect your Gmail account in Taskade"). Turning on starts the automation on its own start (a schedule, an app event, a webhook or a form). Turning off stops its trigger and the runs that its own start began. A run started on request (run_flow, a form or an app) can finish its remaining steps. To turn it on, pass the automation.updatedAt of the preview with confirm: true. If the automation changed after that preview, the call is refused as stale: preview again. Turning off needs no updatedAt. Every change returns before and after, and an undo call (the same tool with the other turn). Turning off deletes a shared form link, and turning on does not bring it back.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"spaceId": "<spaceId>",
"flowId": "<flowId>",
"turn": "<turn>"
},
"name": "switch_automation"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| turn | Yes | "on" or "off" | |
| flowId | Yes | Automation ID from `list_automations` | |
| confirm | No | true makes the change. Omit it (or false) to read what the change does, with no change. | |
| spaceId | Yes | Space ID | |
| updatedAt | No | The `automation.updatedAt` of the preview. Required with turn "on" and confirm: true. Ignored with turn "off". |