Skip to content

If

Evaluates a condition on inputs A and B and either forwards one of two inputs (TRUE_IN/FALSE_IN) or returns a boolean result. Supports a rich set of comparisons and a CUSTOM expression mode, with optional inversion via NOT. Implements lazy evaluation so only the inputs needed for the selected condition are executed.
Preview

Usage

Use this node to branch workflow execution based on dynamic conditions. Connect A and B for comparisons, then either: enable Return Inputs to route TRUE_IN/FALSE_IN through the node based on the condition, or disable it to output a boolean. Choose CUSTOM to write an expression using A/B and available memory variables to define complex conditions.

Inputs

FieldRequiredTypeDescriptionExample
conditionTrueENUMThe condition to evaluate between A and B or via a custom expression.A == B
require_inputsTrueBOOLEANEnable to forward TRUE_IN/FALSE_IN based on the result. Disable to return a boolean result instead.True
NOTTrueBOOLEANInvert the result after evaluation. For booleans it flips True/False; for non-bool types it applies bitwise inversion.False
custom_expressionTrueSTRINGExpression used when condition is CUSTOM. You may reference A/a and B/b, and named global variables from memory storage nodes. Most Python-like expressions and built-ins supported.2*a == 5*b + 2
AFalseANYFirst input to evaluate. Only needed if the selected condition or custom expression references A.5
BFalseANYSecond input to evaluate. Only needed if the selected condition or custom expression references B.5
TRUE_INFalseANYValue to forward if the evaluated condition is True. Required when Return Inputs is enabled and the result is True.proceed
FALSE_INFalseANYValue to forward if the evaluated condition is False. Required when Return Inputs is enabled and the result is False.abort

Outputs

FieldTypeDescriptionExample
*ANYIf Return Inputs is enabled, forwards TRUE_IN when the condition is True or FALSE_IN when False. If disabled, outputs a boolean result.True

Important Notes

  • Conditions supported: A is TRUE, B is TRUE, A is NONE, B is NONE, A == B, A != B, A > B, A >= B, A < B, A <= B, A is B, A is not B, A in B, B in A, A & B, A | B, A ^ B, CUSTOM.
  • Lazy evaluation: Only inputs required by the selected condition or referenced in custom_expression are executed.
  • Return mode: When Return Inputs is enabled, you must provide TRUE_IN and FALSE_IN. When disabled, the node returns a boolean.
  • CUSTOM expressions: You may reference A/a and B/b and named global memory variables. If the expression references A or B, those inputs must not be None.
  • Error handling: If evaluation of the condition raises an error, the node logs it and defaults the result to False.
  • NOT behavior: Applies logical NOT for boolean results, otherwise bitwise inversion (~) for non-boolean types.

Troubleshooting

  • Node outputs False unexpectedly: Check data types of A and B are compatible with the chosen condition (e.g., 'in' expects iterable container). Review logs for any evaluation errors.
  • No output forwarded when Return Inputs is enabled: Ensure both TRUE_IN and FALSE_IN are connected. The node will forward only the branch that matches the evaluated result.
  • CUSTOM expression disabled: The custom_expression field is only enabled when condition is set to CUSTOM.
  • CUSTOM uses A/B but result is missing: Make sure A and/or B are connected and not None if the expression references them.
  • Unexpected bitwise inversion: If NOT is enabled and the result is not boolean, the node applies ~result. Ensure your condition yields a boolean if you want logical inversion.