pm_create_automation
Create an automation rule. Exactly ONE scope must be set — listIdentifier OR folderIdentifier OR spaceIdentifier. triggers and actions are arrays; conditionNodes is the flattened condition tree (omit for "always-true"). All parameters fields on triggers/actions/conditions are JSON-encoded strings, not nested objects. Before crafting, call pm_list_reference_data to learn the valid action/condition/trigger types. API-key scope: automations:write.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Display name (max 200 chars) | |
| active | No | Start enabled or disabled. Default true on backend. | |
| account | No | Multi-account auth only: name of the account from X-Dutify-Accounts to use for this call. Ignored in single-account mode (X-API-Key header). When multiple accounts are configured and this is omitted, the call fails with ACCOUNT_REQUIRED listing the available names. list_accounts never requires a selection. | |
| actions | Yes | Actions executed in order on trigger | |
| triggers | Yes | One or more triggers (OR-ed) | |
| workspace | No | Workspace identifier or exact name for this call. Overrides the configured workspace. For personal keys, discover candidates with list_workspaces and select explicitly. Does not change other calls or expand a workspace key's access. | |
| description | No | Optional description (max 2000 chars) | |
| conditionNodes | No | Optional flat condition tree (AND/OR groups + leaf predicates) | |
| listIdentifier | No | Scope: a list (use exactly one of list/folder/space) | |
| spaceIdentifier | No | Scope: a space | |
| folderIdentifier | No | Scope: a folder |