Skip to main content

conditional

Internal beta โ€” config shape is being migrated

The Automation API is an internal beta and is not released yet โ€” endpoints and payloads may change or be withdrawn without notice. This action's config is being migrated to a typed schema; the fields below reflect that in-progress shape. Always read the authoritative, live shape from GET /v1/automation/meta/action before building against it.

Condition โ€” runs a then branch when a condition holds, and an optional else branch otherwise. group: "control_flow". No specific trigger context is required.

Part of the Flow control family. This page documents the typed config; for how an action sits inside an automation definition, see Actions and Action examples.

The control-flow shape now lives entirely in config โ€” the condition and the branches recently moved off the action's top level. Each branch is a nested action list, and a branch is enabled by presence: there are no *_enabled flags.

Configโ€‹

KeyTypeRequiredDescription
conditionfilter group | nullnoThe if-condition. null or omitted means always true.
action_rowsarray of nested actionsnoThe then branch โ€” actions run when the condition holds.
else_action_rowsarray of nested actionsnoThe else branch โ€” actions run when the condition fails. Omitted disables the else branch.

Exampleโ€‹

An action entry inside an automation definition's actions[]:

{
"type": "conditional",
"config": {
"condition": {
"operator": "and",
"rows": [
{
"subject": { "kind": "variable", "source": "field", "field_id": 512, "field_type": "status", "previous": false, "collection": false, "triggering": false },
"operator": "is_any_of",
"value": { "type": "ids", "ids": [9001] }
}
]
},
"action_rows": [
{ "type": "send_email", "config": { "to_address": ["[email protected]"], "subject": ["Still open"] } }
],
"else_action_rows": [
{ "type": "current_record_delete", "config": {} }
]
}
}

Validation & behaviorโ€‹

  • All three members are optional. An omitted or null condition evaluates as always true, so the then branch always runs.
  • else_action_rows is enabled by presence: omit it to disable the else branch entirely โ€” there is no *_enabled flag.
  • action_rows and else_action_rows each hold a nested action list; the available nested action types are advertised by GET /v1/automation/meta/action.
  • condition is a boolean filter expression; see GET /v1/automation/meta/filter for the operators available per field type.

See alsoโ€‹