Skip to content

Preview an automation against a task

POST
/projects/{id}/automations/{automationId}/dry-run
Code sample: Shell / cURL
curl --request POST \
--url https://example.com/api/v1/projects/example/automations/example/dry-run \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "taskId": "example" }'

Requires the projects.manage permission and reach to the project and the task. Reports per trigger whether the task’s own state would fire it now (triggers[].matchesNow, null when only an event can), which conditions hold, whether the configured all/any match succeeds, and what each action would do, in order. Nothing is written: no task change, no activity and no run-log entry. Branch previews are a flat preorder list; nested rows include parentBranchId and depth, and selected marks every node on the matching path. matchedBranchId identifies the selected top-level branch, while actions includes parent actions followed by selected child actions.

id
required

Resource identifier (CUID2).

string
>= 1 characters

Resource identifier (CUID2).

automationId
required

Project automation identifier (CUID2).

string
>= 1 characters

Project automation identifier (CUID2).

Media typeapplication/json
object
taskId
required

Task the automation is evaluated against.

string
>= 1 characters

Example generated

{
"taskId": "example"
}

The preview.

Media typeapplication/json
object
data
required

Read-only evaluation: matchedBranchId identifies the selected top-level branch. Branch previews are in preorder, with parentBranchId and depth on nested rows; selected marks every node on the matching path. Actions include parent actions before selected child actions.

object
actions
required
Array<object>
object
label
required
string
summary
required
string
type
required
string
automationId
required
string
branches
required
Array<object>
object
actions
required
Array<object>
object
label
required
string
summary
required
string
type
required
string
conditions
required
Array<object>
object
holds
required
boolean
isDecidedByAi

True for an AI condition. A dry run never calls the model, so it reports holds: true for it and previews the actions as if the AI answered as the condition asks.

boolean
op
required
string
operand
required
string
subject
required
string
depth

Nested level relative to the root; omitted for top-level branches.

integer
>= 1 <= 4
id
required
string
matched
required
boolean
parentBranchId

Parent branch ID; omitted for top-level branches.

string
selected
required
boolean
conditions
required
Array<object>
object
holds
required
boolean
isDecidedByAi

True for an AI condition. A dry run never calls the model, so it reports holds: true for it and previews the actions as if the AI answered as the condition asks.

boolean
op
required
string
operand
required
string
subject
required
string
matched
required
boolean
matchedBranchId
required
string | null
skippedReason
required
string | null
taskId
required
string
triggers
required

What each trigger of the automation would do for the task, in editor order.

Array<object>
object
config
required
Any of:
object
days

TASK_DUE_SOON or TASK_START_SOON: days before the scheduled date (0 means today). TASK_IN_STATUS_FOR: business days the task has been in the status (1 or more).

integer
<= 365
fieldDefinitionId

TASK_CUSTOM_FIELD_CHANGED: stable ID of the project or workspace custom field.

string
>= 1 characters
labelId

TASK_LABEL_ADDED or TASK_LABEL_REMOVED: stable ID of the tag (required).

string
>= 1 characters
statusId

TASK_STATUS_CHANGED: optional destination status; omit for any status. TASK_IN_STATUS_FOR: the status the task sits in (required).

string
>= 1 characters
matchesNow
required

True or false when the task’s own state decides the trigger (scheduled dates, completion); null when only an event can fire it.

boolean | null
reason
required
string
type
required
string
Allowed values: TASK_CREATED TASK_STATUS_CHANGED TASK_LABEL_ADDED TASK_LABEL_REMOVED TASK_ASSIGNED TASK_DUE_SOON TASK_COMPLETED TASK_COMPLETION_CHANGED TASK_NAME_CHANGED TASK_DESCRIPTION_CHANGED TASK_DUE_DATE_CHANGED TASK_OVERDUE TASK_START_DATE_CHANGED TASK_START_SOON TASK_START_PASSED TASK_IN_STATUS_FOR TASK_UNBLOCKED TASK_OR_SUBTASKS_COMPLETION_CHANGED TASK_CUSTOM_FIELD_CHANGED TASK_PRIORITY_CHANGED TASK_TIME_ESTIMATE_CHANGED TASK_ATTACHMENT_ADDED TASK_COMMENT_ADDED TASK_COLLABORATOR_ADDED TASK_ADDED_TO_PROJECT TASK_VIDEO_TRANSCRIPT_READY TASK_CLIENT_REPLIED MANUAL INCOMING_WEBHOOK

Example

{
"data": {
"triggers": [
{
"type": "TASK_CREATED"
}
]
}
}

Validation error. Parse failures include field paths and expectations.

Media typeapplication/json

Validation error with safe field paths and expected values; submitted values are never returned.

object
error
required
object
code
required

Stable machine-readable error code.

string
issues
Array<object>
object
expected
required
string
message
required
string
path
required
Array<string | number>
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Unauthorized.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Forbidden.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Not found.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Invalid input.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Rate limit exceeded. Wait for Retry-After before retrying.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}
RateLimit-Limit
string
/^\d+$/

Maximum requests in the current quota window.

RateLimit-Policy
string

Quota policy in requests and window seconds, for example 60;w=60.

RateLimit-Remaining
string
/^\d+$/

Requests left in this quota window (zero when blocked).

RateLimit-Reset
string
/^\d+$/

Seconds until the current quota window resets, when available from the rate-limit store.

Retry-After
string
/^\d+$/

Seconds until another request may be attempted.