Logic action Logic

Branch your workflow based on a condition. If the condition is true, the 'then' path runs; otherwise the 'else' path runs. Supports comparison and membership checks.

At a Glance

FieldValue
Action IDif
CategoryLogic
ConnectorNot required
Requires gasNo
Funds movementNone declared
Tagslogic, conditional, branching, control-flow

Payload Schema

FieldTypeRequiredDescription
conditionobjectYesCondition DSL. Top-level must be $and or $or. Inside arrays: comparison format { "{{left}}": { "$op": right } } where $op is $eq, $ne, $gt, $gte, $lt, $lte, $in, $nin. Left operand (key) can be a template variable like {{node.result.field}} or literal. Right operand (value) can be number, string, template variable, or array (for $in/$nin).

Result Schema

FieldTypeRequiredDescription
branchstringYesWhich branch to take

Examples

json
{ "type": "if", "payload": { "condition": { "$and": [ { "{{root.result.price}}": { "$gt": 1000 } } ] } }, "children": []}

Payload fields can use workflow expressions such as {{$trigger.body.amount}}, {{$nodes.fetch.result.price}}, and {{$props.asset}} when the value should come from a trigger, prior node, or reusable workflow prop.

Ask a question... ⌘I