Skip to main content

Conditional execution

SimplAI exposes two no-code mechanisms for conditional flow in a Tool — both built around the same Field / Operator / Value model:

  1. The Conditional Node — for branching (IF/ELSE) routing between multiple downstream paths.
  2. Node-level execution conditions — for deciding whether a single step runs or is skipped.

Both use the same operators and the same value model, so once you learn one, the other is identical.

Shared model — Field, Operator, Value

Every condition consists of:

  • Field — the runtime value to evaluate. Supports {{ }} variable mapping (e.g., {{python_code.result}} or {{api_response.score}}). Values can be string, number, boolean, or null (resolved at runtime).
  • Operator — the comparison logic.
  • Value — the comparison value. Required for most operators, hidden for a few (booleans, null checks), and double for range operators.

Operators

Equality & String: Equals, Contains, Starts with, Ends with, Matches regex.

Negative variants: Does not equal, Does not contain, Does not start with, Does not end with, Does not match regex.

Numeric: Less than, Less than or equal to, Greater than, Greater than or equal to.

Boolean & Null: Is true, Is false, Is null, Is not null.

Range: Between (inclusive), Between (exclusive) — both take two value fields with AND between them.

Value field behavior

Operator typeValue input requirement
Equality / String / Negative / Numeric / RegexOne value field
Is true / Is false / Is null / Is not nullNo value field
Between (inclusive / exclusive)Two value fields with AND

Value fields accept manual input or dynamic variable mapping via {{ }}.

The Conditional Node

The Conditional Node is a dedicated workflow node for routing between branches.

How it works

  • The node has a root IF / ELSE structure.
  • Inside the IF, you add one or more conditions (rows of Field / Operator / Value).
  • Conditions can be combined with AND / OR grouping at the root level — for example, "(A is true AND B greater than 10) OR (C contains 'foo')".
  • The node has two output paths: IF (when conditions evaluate true) and ELSE (when they don't).

Example

IF
{{python_code.result}} Between (inclusive) 50 AND 80
AND
{{user_status}} Is not null
THEN
Route to Success Path
ELSE
Route to Failure Path

When to use

Use the Conditional Node when you need to branch the workflow — different downstream paths for different outcomes.

Node-level execution conditions (no-code)

A simpler form of conditional logic lives inside every step as a side-panel setting. Instead of branching the workflow, it decides whether the step itself runs.

How it works

  • Open any step → the side panel has a Condition section.
  • Toggle the no-code condition on.
  • Add one or more rows of Field / Operator / Value (same model as the Conditional Node).
  • Pick the rule mode at the node level:
    • ALL conditions must match (AND), or
    • ANY condition can match (OR).

Mixing AND and OR inside the same node's conditions is not allowed — that constraint keeps node-level logic simple and predictable. For mixed boolean logic, use the Conditional Node and route around the step instead.

Execution

  • If the condition evaluates TRUE → the node executes.
  • If the condition evaluates FALSE → the node is silently skipped, and the workflow continues to the next step.

Code view (read-only or optional)

The no-code editor is the primary view. A Code view displays the equivalent raw expression (JavaScript-style) auto-generated from your no-code config:

(
python_code.result > 70 &&
api_response.status === "success" &&
user_id != null
)

You can copy the generated expression. Editing it manually is supported but breaks the no-code view's ability to round-trip — a warning is shown if you do.

When to use

  • Skip an expensive node when it's not needed (e.g., skip Web Research when a Knowledge Base hit was found).
  • Route around steps that don't apply for a particular input.
  • Guard a side-effectful step with a sanity check.

Backward compatibility

Existing workflows that use JavaScript-based conditional logic continue to work unchanged. The no-code mode is additive — you choose between no-code or raw expression per step.

Combine with foreach and execution rules

Conditional execution composes with the other step-level controls — foreach, trigger rules, parallelism. See Tool steps — Advanced for the full list of step controls and how they interact.