Portal Community

Logic Node Reference

if-condition

Evaluates a JavaScript expression and routes to the true or false output port. Classic binary branch.

FieldDescription
ConditionJavaScript expression (e.g., $json.status === 'approved')

Output ports: true (green), false (grey)

switch

Evaluates a value and routes to the matching case port. Equivalent to a code switch statement.

FieldDescription
Value ExpressionExpression that produces the value to match against (e.g., $json.category)
CasesList of {value, label} pairs — each creates one output port
Default PortOptional — catches values that match no case

filter

Evaluates a condition against the input. If true, passes data to the match port; otherwise to the no-match port. Similar to if-condition but semantically used for data filtering rather than branching.

loop

Iterates over an array, executing the loop body once per item. The current item is available as $input.item and the index as $input.index.

FieldDescription
Array ExpressionExpression that evaluates to the array to iterate (e.g., $json.items)
Max IterationsSafety limit to prevent infinite loops (default: 1000)
Batch SizeOptional: process N items at a time instead of one

Output ports: body (executed each iteration), done (executed after all iterations complete), error

break

Exits the current loop immediately. Used inside a loop body. Routes to the loop's done port without completing remaining iterations.

continue

Skips to the next iteration of the current loop. Used inside a loop body to bypass downstream nodes for the current item.

try-catch

Wraps a section of the workflow in error handling. Nodes inside the try block route to catch if they throw an unhandled error.

FieldDescription
Error VariableName of the variable where the caught error is stored (default: error). Accessible in catch block as $var.error

Output ports: try (normal flow), catch (error occurred), finally (always runs after try or catch)

Diamond Shape = Decision Point All logic nodes render as diamonds. This visual convention makes it immediately clear where the workflow branches. When zoomed out, the diamond pattern lets you quickly identify the decision points in a complex workflow.