โก Logic Gate
Evaluates one or more conditions using AND/OR logic, then routes workflow execution to the
true or false branch depending on the result.
Category: Flow Control ยท Type identifier: logic
Overview
The Logic Gate is one of the most commonly used nodes in Flusso. It lets you make decisions
inside a workflow โ "only continue if this condition is met" โ without writing any code. You
define one or more conditions, choose whether all of them must be true (AND) or
at least one must be true (OR), and the node automatically sends execution down the
correct path.
Each condition compares a value from a previous step โ referenced with the
{{ variable }} syntax โ against a target value using an operator such as
equals, greater than, or contains.
In linear mode, when the result is false, the remaining
steps in the workflow are skipped, or execution jumps forward to a Stop node. When the result
is true, the workflow continues normally with the very next step.
In graph mode, the Logic Gate exposes two output ports โ one labelled
true and one labelled false. You connect each port to a different node or
sub-graph, giving you full branching control over the execution path.
Configuration
| Field |
Status |
Description |
| Operator |
Required |
AND โ all conditions must be true; OR โ at least one condition must be true |
| Conditions |
Required |
One or more conditions to evaluate. Each condition has a Field (a variable reference), an Operator, and a Value to compare against. |
Available Condition Operators
- equals โ the field value exactly matches the target value.
- not equals โ the field value does not match the target value.
- contains โ the field string contains the target string as a substring.
- does not contain โ the field string does not contain the target string.
- starts with โ the field string begins with the target string.
- ends with โ the field string ends with the target string.
- greater than โ the field number is strictly greater than the target number.
- less than โ the field number is strictly less than the target number.
- greater than or equal โ the field number is greater than or equal to the target number.
- less than or equal โ the field number is less than or equal to the target number.
- is null โ the field is
null or not present. No value required.
- is not null โ the field exists and is not
null. No value required.
- is empty โ the field is an empty string, empty array, or zero. No value required.
- is not empty โ the field has a non-empty, non-zero value. No value required.
- matches regex โ the field string matches the provided regular expression pattern.
Output Data
The Logic Gate produces the following output variables, available in subsequent steps as {{ step_key.output.* }}:
| Variable |
Type |
Description |
result |
boolean |
true if the overall evaluation passed, false otherwise. |
matched_conditions |
array |
An array of the individual conditions that evaluated to true. Useful for logging or downstream decisions. |
Example Usage
Gate access to a premium feature
You want to allow a workflow to proceed only when a user's account is active and
they are on the premium plan. If either condition fails, the workflow stops immediately.
-
Add an HTTP Request node to fetch user details. The step key is
fetch_user.
-
Add a Logic Gate node after it. Set the top-level operator to
AND.
-
Add the first condition:
Field: {{ fetch_user.output.status }}
Operator: equals
Value: active
-
Add the second condition:
Field: {{ fetch_user.output.plan }}
Operator: equals
Value: premium
-
In linear mode: steps after the Logic Gate only execute if both conditions
are true. Connect a Stop node on the false path to explicitly mark the run as completed
when the user does not qualify.
Tips & Notes
-
AND vs OR. Use
AND when every condition must be satisfied
(stricter). Use OR when any one condition is enough to continue (more
permissive).
-
Nested logic. For complex multi-level logic (e.g. A and (B or C)),
chain two Logic Gate nodes in sequence rather than trying to express it in a single node.
-
Null safety. If the field you are testing might not exist, add an
is not null condition first so that subsequent comparisons do not fail on a missing
value.
-
Graph mode branching. In graph mode, always connect both the true
and false output ports. Leaving a port unconnected means that branch of the workflow simply
ends silently.
-
Regex tips. The matches regex operator uses PHP-compatible regular
expression syntax. Wrap the pattern with delimiters, e.g.
/^[A-Z]{2}\d{4}$/i.
Related Nodes
- Switch โ route to one of several named branches based on a value, rather than a true/false split.
- Stop โ explicitly terminate the workflow run at the end of a false branch.
- Set Variable โ store intermediate values that can then be tested by a Logic Gate.