Infer a Schema v2

Node templates usually provide Parameter or Return schemas but in some cases, schema may not be known until the Node runs for the first time. When this occurs, the Console will offer an infer schema which will allow you to apply the discovered schema to the shape of the Node step.

Produce representative run data

  1. Save the Workflow so it has a stable key.
  2. Configure the intended Environment and Cluster.
  3. Run the Workflow with a small, representative input.
  4. Wait for the run and log polling to complete.

Inference uses Step data from Workflow logs. It does not call the external system again. If the latest run did not contain a Step or field, inference cannot discover it.

The designer can also search recent logs when its current run cache is empty. That search is limited to recent history, so running the Workflow again is the most reliable way to make current data available.

Infer one Step

  1. In Canvas view, open the Step's context menu.
  2. Click Infer from run data.
  3. Review each Property marked as new or changed, including its type, nested fields, and sample.
  4. Select only the top-level Properties whose complete inferred subtree you want to apply.
  5. Click Apply, or click Cancel to leave the Step unchanged.

Changed Properties show the current and inferred definitions. Unchanged Properties are shown for context but cannot be selected. The data-age label identifies the log entry used.

Infer all Steps

Click Infer all steps in the designer toolbar to refresh run-backed schemas across the Workflow. If you start from Code view, the Console switches to Canvas view for review.

Every Step with a detected change enters inference review. Confirm or cancel each Step. Nested Steps inside collapsed containers are expanded so their changes can be reviewed.

The toolbar reports these common outcomes:

  • No run data was found. Run the Workflow and try again.
  • Run data was found, but the authored schemas are already current.
  • One or more Steps are ready for review.
  • Inference failed while retrieving or comparing log data.

Understand what Apply changes

Inference is additive. Applying a selected Property updates its inferred Type, Sample, and nested Properties while preserving existing Value, Expression, logging configuration, and Canvas metadata where compatible.

It does not remove designer-authored descendants merely because they were absent from the sample.

Verify the inferred contract

  1. Resolve any new messages in Problems.
  2. Confirm that downstream Expressions reference the inferred names with exact casing.
  3. Use Preview to inspect compile-time Expression results.
  4. Run again with a second representative sample, including optional and repeated fields.
  5. Save only after the schema and mappings remain correct.

One sample does not prove every optional field or every item variant. For sparse payloads, use a deliberately representative test response or design the missing contract fields yourself.

See also

See Workflow Properties, Data Mapping, and Mapping and Expression Errors.