Skip to main content
As a workflow runs, each node’s output is stored under its node id. The workflow’s input is stored under trigger.input. Later nodes read these values in their config.input, prompt, message, output, iterable, and router conditions.

Referencing state

There are three ways to read state: In a $expr, every node id is a variable, and a node that hasn’t run yet is null. Besides standard CEL, you can use:
  • has(node_id.field) to check whether an optional field is present.
  • coalesce(a, b, ...) (2 to 5 arguments) to take the first non-null value.
  • count(x) to count the items in a list.

What each node outputs

Workflow input

Every run has an input object at trigger.input. Where it comes from depends on how the run started:

input_schema

Add an input_schema at the top of the definition to describe and validate the input. It’s a standard JSON Schema whose root is an object. Mark required fields with required, and allow null with a type union such as ["string", "null"].
Before every run, Major fills in the schema’s default values, merges the trigger’s input over them (explicit values win, including null, and arrays replace arrays), and validates the result. Values aren’t coerced, so "50" doesn’t pass as an integer. If the input fails validation, Run now shows the error, and a triggered run is recorded as failed without running any nodes. Without an input_schema, the input is passed through as is. With an input_schema, Run now shows a form for the input, and you can save the values you enter as the workflow’s defaults.

Next steps

Nodes

Every node type and its fields.

Triggers

Start a workflow and shape its input.