All nodes/Data/Operators

Logic

Logic operation: a comparison (==, !=, >, <, >=, <=) or a boolean operation (and, or, not) over two values. Returns a boolean result. Often used before an If node.

Logic
InputResult
A
B

Type in the graph: logic_op

Exec

An error branch can be enabled (expose_error_output) to handle failures on their own path.

Ports can be split into separate execution and data handles.

Try it

Minimal working workflow

Entry
Logic
Exit
  • Execute + Data
Press “Copy nodes”, open the editor and hit Ctrl+V on the canvas.

Runs as pasted

When to use it

The node compares two values and returns true or false as data: the flag can be written into a variable, passed further down the chain, or fed into another node’s port.

When the result only has to fork execution, If / Else is usually enough — the condition is written directly in its field and no separate comparison step is needed. Logic earns its place when the values are already split across ports, or when the result is used more than once.

How it works

Operands arrive on the “A” and “B” ports; the “Input” port triggers the step and fills in a missing operand when it receives an array [a, b] or an object {"a": …, "b": …}. The “Not (!a)” operation uses only “A”.

Comparisons differ in strictness. “Equal” and “Not equal” compare values as they are, with no type coercion. “Greater than”, “Less than” and their variants convert both sides to numbers first. “And”, “Or” and “Not” work on truthiness: a non-empty string, a non-zero number and a non-empty list all count as true.

Common mistakes

  • A number that arrived as text does not equal a number. "5" and 5 compare as false under “Equal”. Set the type at the source — in a Constant, say, or in the variable’s declaration.
  • A numeric comparison of non-numbers silently returns false. “Greater than” over two strings does not fail; it answers no, the branch below goes the wrong way, and the run shows no error.
  • The string “false” is true. For “And”, “Or” and “Not” only emptiness matters, not the content: the text false coming out of a template counts as true. Compare such values with “Equal” instead.
  • A missing operand stops the step. The single exception is “Not (!a)”, which does not need “B”.
  • In templates the result renders as True and False — capitalised. Keep that in mind if you compare it as text further down.

Inputs

PortWirePayloadNotes
InputinputExecute + Dataexecute_data

Run trigger and operands: a 2-element array [a, b] or an object {"a": …, "b": …} fills whichever of A/B is not wired directly.

AaDatadata

First operand

BbDatadata

Second operand (not used for 'not')

Outputs

PortWirePayloadNotes
ResultoutputExecute + Dataexecute_dataobject

Configuration

FieldTypeDefaultDescription
Operationoperationstring==

Options: == — Equal (==), != — Not equal (!=), > — Greater than (>), < — Less than (<), >= — Greater or equal (>=), <= — Less or equal (<=), and — And (&&), or — Or (||), not — Not (!a)

Shared fields

Every node has these three — the platform adds them, not the node author.

  • expose_error_output — When enabled, show an execution output to connect nodes that run if this step fails.
  • split_ports_in — Show separate execution and data input handles instead of one combined port.
  • split_ports_out — Show separate execution and data output handles instead of one combined port.