Skip to content

If/else Node

The If/else node branches workflow execution by evaluating configured conditions and routing to the matching output path.

Use If/else when the workflow should branch on explicit, readable conditions instead of relying on language reasoning. It is best when reviewers should be able to inspect the routing logic directly on the canvas.

Choose If/else when:

  • the branch depends on known fields or deterministic values,
  • the routing rules should be auditable and easy to review,
  • the order of conditions matters,
  • or the workflow needs a clear fallback path.

If the branch decision depends on natural-language judgment, use AI Agent exit conditions instead.

  1. Execution reaches the If/else node.
  2. Conditions are checked in order.
  3. The first matching branch is selected.
  4. If no earlier condition matches, the Else branch runs when configured.
  5. The workflow continues through the selected output port.

This node works best when the input is already structured, usually from AI Extraction or Function.

  • Conditions define the if and else-if rules.
  • Else branch provides the fallback route when nothing else matches.
  • Labels name the output paths so the graph stays readable.

Put the most specific conditions first and leave the broadest or safest fallback for the end.

  • Priority routing Send urgent cases to Transfer and lower-priority cases to another automated step.
  • Field validation Route missing or invalid extracted data to a clarification path.
  • Channel behavior Separate handling for voice, chat, or other workflow contexts.
  • An If/else node can branch on a computed value such as ${nodes.parity.output.parity} when the decision should be fully deterministic.
  • Labels like ready, missing_info, and else make complex routing easier to review on the canvas.

The canvas view shows how each configured branch becomes its own output path.

Annotated If/else node on the workflow canvas with dynamic branch output ports

The inspector is where you define conditions, set their order, and label the resulting branches.

Annotated If/else node inspector showing condition rows and branch labels

  • Condition order matters.
  • Most branches should still have an Else fallback.
  • Branch on clean, structured values whenever possible.
  • Keep labels readable so downstream routing remains obvious in the graph.

Does order matter? Yes. Put specific conditions before broad conditions so the intended branch matches first.

Should every If/else have an Else branch? Usually yes. Else gives the workflow a safe fallback when data is missing or unexpected.