Logic & Control Flow Nodes
> Control when and how your flow executes -- branch on conditions, validate data, switch between paths, and generate dynamic code.
Logic nodes determine the path of execution in your routes. They include conditional branching, boolean operators, validation, and enum-based switching. Many of these nodes have sequence pins because they control which downstream nodes run.
Conditionals
if-condition
Evaluates a boolean condition and executes one of two sequence paths.
| Pin | Direction | Type | |-----|-----------|------| | sequence in | Input | sequence | | condition | Input | boolean | | true | Output | sequence | | false | Output | sequence |
When condition is true, execution continues from the true sequence output. When false, execution continues from the false output.
You do not need to connect both outputs. If you only need to act on the true case, leave the false output unconnected.
condition-node
A pure (data-only) conditional. Returns one of two values based on a condition, without sequence pins.
| Pin | Direction | Type | |-----|-----------|------| | condition | Input | boolean | | ifTrue | Input | any | | ifFalse | Input | any | | result | Output | any |
switch-enum
Routes execution to one of several sequence outputs based on an enum value. Connect any concrete enum output to the node and Brickr derives the enum type automatically, then generates one sequence pin per enum value.
| Pin | Direction | Type | |-----|-----------|------| | sequence in | Input | sequence | | value | Input | enum-value:any | | case:<enum-value> | Output | sequence | | default | Output | sequence |
If no case matches, execution continues from the default output.
You do not choose the enum in a separate dropdown anymore. The cases come from the connected value pin, so if you connect a different enum later, the outputs update to match.
Boolean Operators
not-bool
Inverts a boolean value. Returns true if the input is false, and vice versa.
| Pin | Direction | Type | |-----|-----------|------| | value | Input | boolean | | result | Output | boolean |
Checks
is-empty
Returns true if the input value is empty. Works with strings (empty string), arrays (no elements), objects (no properties), and null/undefined values.
| Pin | Direction | Type | |-----|-----------|------| | value | Input | any | | result | Output | boolean |
validate
Validates input data against configured rules and returns whether the validation passed.
| Pin | Direction | Type | |-----|-----------|------| | sequence in | Input | sequence | | value | Input | any | | valid | Output | boolean | | error | Output | string | | sequence out | Output | sequence |
Use validate to check user input before processing it. Configure validation rules in the node's settings panel to enforce constraints like required fields, minimum length, numeric ranges, and more.
Code Generation
generate-code
Generates a random code string. Useful for creating verification codes, tokens, or unique identifiers.
| Pin | Direction | Type | |-----|-----------|------| | length | Input | number | | result | Output | string |
Combine generate-code with set-variable to store a generated code for later comparison, such as in email verification or two-factor authentication flows.