Decision node

Status: Current | Last reviewed: 2026-10-08

Use a Decision to choose the next workflow path with rules, optionally informed by an AI assessment. Decision replaces the Branching Logic label; existing nodes and connections keep working.

Build rules visually

  1. Add Decision to your workflow and select Rules.
  2. Add a branch and give it an outcome name.
  3. Select Visual, then Add condition. Choose a workflow field, comparison, and value type: Text, Number, Boolean, Null, or Another field.
  4. Use All conditions (AND) or Any condition (OR). Add groups to combine them.
  5. Connect each branch handle on the canvas to its next node.

The first matching branch wins. Use Move up / Move down to change priority. An empty condition always matches; place it last if you want a catch-all. Else runs when no branch matches. An unconnected outcome stops that path.

Branch labels are cosmetic: renaming a label preserves its connection. Removing a branch removes its connection.

Switch to expressions

Choose Expression to edit the stored condition. Visual conditions use JSONata, for example:

{{jsonata: (input.amount >= 500 and input.tier = "premium")}}

Switch back to Visual when the expression uses supported comparisons and AND/OR groups. Functions, legacy merge comparisons, and other complex expressions stay in Expression mode without being rewritten. Invalid visual edits show an error and are not saved until corrected.

Add an AI assessment

Select AI-assisted, choose an OpenAI connection, and provide Assessment input using text. Use Insert a workflow field to add workflow evidence without typing a merge expression. The provider is OpenAI Decisions and the model is gpt-6-luna.

Add independent questions with unique answer names:

Question type Configure Result
Choose an option Distinct choice values and descriptions choice, confidence, option probabilities
Check a condition A question about the evidence probability from 0 to 1
Score against a rubric Levels ordered lowest to highest score, confidence, level probabilities

Score levels begin at index 0. The score is a weighted average and can fall between levels. Set numeric routing ranges accordingly. Probability and confidence are separate provider fields; choose thresholds using your own test examples.

Add branches from choices creates editable visual rules for each option before any existing catch-all. Connect those branches on the canvas. For other rules, select an answer field such as gate.answers.department.choice or gate.answers.urgent.probability, where gate is your Decision node ID. You can combine AI answers with ordinary workflow fields. Later nodes can reuse the named answers.

Questions in one assessment share the same input and run independently. Use successive Decision nodes when a question depends on an earlier answer.

Under Images and timeout, use Upload images or choose an existing image field. Uploads show a thumbnail and can be removed individually. PNG, JPEG, WebP, and GIF uploads are supported, up to 2 MB combined. A selected workflow field must supply inline image data; hosted image URLs are not supported. The timeout includes bounded retries.

Handle errors and uncertainty

Provider failures and refusals fail the workflow by default. You can explicitly route each to an existing branch or Else. They produce different status values (error or refusal). A low-probability answer is a successful assessment: handle uncertainty with a branch condition and your chosen threshold.

Test the decision

In Test decision, fill in Workflow inputs. Declared inputs appear as text, number, Boolean, object, or list controls. For an amount-based rule, enter 750 in the amount field and click Test decision.

Expand Variables, Previous results, Trigger data, or Loop context to supply more evidence. Add a sample for a workflow field selects a known input or earlier node output and creates its fields automatically. For structured values, use Add field, choose its type, and use Add item for lists. Nested values have the same controls; JSON is not required.

The preview uses the same runtime as a workflow run, shows the selected branch and answer evidence, and never runs downstream nodes. AI tests call the selected provider. Changing configuration or sample values marks the previous result as stale. Full result and branch checks offers optional read-only diagnostics.

After the single-node test, use the workflow Test view to verify connected nodes and final outputs.

Outputs and availability

The node exposes route_value, matched_output, status, and evaluated_branches. AI-assisted decisions also expose answers, provider/model information, request ID, latency, and provider-reported usage.

OpenAI Decisions is a public-beta integration and requires access through your OpenAI connection. AI assessments are currently unavailable in evaluation sandboxes and standalone LangGraph code exports; workflow JSON export/import preserves their configuration. Rules-only Decisions support standalone export.

See also