๐Ÿ‡ฌ๐Ÿ‡ง EN
๐Ÿ‡ฎ๐Ÿ‡น IT

โšก 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

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.

  1. Add an HTTP Request node to fetch user details. The step key is fetch_user.
  2. Add a Logic Gate node after it. Set the top-level operator to AND.
  3. Add the first condition:
    Field: {{ fetch_user.output.status }} Operator: equals Value: active
  4. Add the second condition:
    Field: {{ fetch_user.output.plan }} Operator: equals Value: premium
  5. 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

Related Nodes