Skip to main content

Boolean

The Boolean node performs logical operations and type conversions. Use it for evaluating conditions, combining boolean expressions, and converting values between types. It is commonly used in conjunction with the Conditional node to build complex branching logic.

Actions​

ActionDescription
boolean:logicalAndReturns true if all inputs are truthy
boolean:logicalOrReturns true if any input is truthy
boolean:logicalNotInverts a boolean value
boolean:compareToCompares two values using a comparison operator
boolean:toNumberConverts a boolean to a number (true = 1, false = 0)
boolean:toStringConverts a boolean to a string ("true" or "false")

boolean:logicalAnd​

Evaluates to true only if all provided values are truthy.

Parameters

ParameterTypeRequiredDescription
valuesarrayYesArray of values to AND together. Non-boolean values are coerced (0, null, empty string = false)

boolean:logicalOr​

Evaluates to true if at least one of the provided values is truthy.

Parameters

ParameterTypeRequiredDescription
valuesarrayYesArray of values to OR together

boolean:logicalNot​

Inverts a boolean value.

Parameters

ParameterTypeRequiredDescription
valueboolean/stringYesThe value to negate

boolean:compareTo​

Compares two values using the specified operator and returns a boolean result.

Parameters

ParameterTypeRequiredDescription
leftanyYesLeft-hand operand
operatorstringYesComparison operator: eq, neq, gt, gte, lt, lte, contains, startsWith, endsWith, matches
rightanyYesRight-hand operand
ignoreCasebooleanNoCase-insensitive comparison for string operators. Defaults to false

Example: String comparison

Example: Regex match

boolean:toNumber​

Converts a boolean value to a number.

Parameters

ParameterTypeRequiredDescription
valueboolean/stringYesThe boolean value to convert. true becomes 1, false becomes 0

boolean:toString​

Converts a boolean value to a string representation.

Parameters

ParameterTypeRequiredDescription
valuebooleanYesThe boolean value to convert
trueValuestringNoCustom string for true. Defaults to "true"
falseValuestringNoCustom string for false. Defaults to "false"

Connection​

No connection required. This is a logic node that operates on in-memory values.

Output​

All boolean actions return a result in this format:

For toNumber, the result is a number. For toString, the result is a string.