Skip to content

Item shapes

Every item that moves between nodes is a JSON document, and its shape is which fields it has and what each one holds. Crios works out the shape that reaches each node from the graph itself and puts it to use: the Data tab and the connections on the canvas show what flows, the expression editor offers the fields that exist, and saving warns when a step reads a field that will never be there. Where Crios cannot know a shape, you can declare it, and you can require one on a node's input — checked when you save, and enforced when the node runs if you ask for that. This page covers all three.

Where a shape comes from

To find the shape arriving at a node, Crios looks upstream:

  • Some node types state what they emit. The Data tab marks such an output Declared.
  • Some pass their input through unchanged (Inherited from the input), so Crios keeps walking upstream past them.
  • Some emit whatever a service answers (Depends on the response).
  • Most node types, including most integrations, declare nothing (Not declared yet). Where nothing declares a shape, the last run's sample, or a pinned fixture, stands in.

When only the outer fields of an item are known, the tab adds Known envelope — the runtime decides the rest.

Under each input, the Data tab says where its shape came from:

The note reads What it means
declared by … That node's type declares the shape.
declared on … Someone declared the shape on that node (see Declaring what a node emits).
via … The items passed through these steps unchanged on the way.
one of several branches Branches meet here, and an item has the shape of one of them.
error lane of … The items arrive on that node's error output.
inferred from a run of … Nothing declares a shape, so a run's sample was read instead.

On the canvas, pointing at a connection that carries items says the same in one line: the number of fields and the first few names, such as 3 keys · id, total, status, with partial added when only part of the shape is known, no known keys when it has no fields, and unknown shape when nothing upstream declares one.

Declaring what a node emits

Some outputs cannot say what they hold: a Code step, a call to your own API, a webhook from a service Crios has no description of. Declare the shape there, and every step after it gets field suggestions and checks.

  1. Select the node and open its Data tab.
  2. Under Output, click Declare a shape on the port. The editor starts from whatever is already known about it.
  3. Fill in the fields — see The schema editor.

A declared shape is information for the editor and for the checks, never a rule: What this port emits, when its type cannot say. Knowledge for the editor, never enforced. The port then reads Declared on this node, and the card on the canvas wears a small mark (Declares the shape of its items).

On a Manual Trigger, the shape you declare is the workflow's input: what a Workflow Call step, or an AI agent that uses the workflow as a tool, is expected to send. See Triggers.

Expecting a shape on a node's input

Expect a shape, under Input on the Data tab, writes down what the node needs: What this node needs on its input. Checked when you save; enforced at run time only when you say so. The editor starts from the shape that arrives and the fields the node's own settings read.

Every save compares the expected shape with the shape that arrives, and warns when a field the node requires is missing (schema_input_missing) or a field it lists has another type (schema_input_type). A field counts as missing only when the arriving shape is known in full; where the upstream shape is open, only the types of the fields it lists are compared, and where it is unknown, there is nothing to compare.

Once a shape is expected, At run time decides what happens when the node runs:

Option What happens
Only check at save Nothing at run time. This is the default.
Warn and continue Each item is checked. When some do not match, the step records one warning with how many and the first mismatch, and the node runs on all of them.
Block invalid items Each item that does not match fails on its own, and the node's On error setting decides what follows, as for any other failure (see Building a workflow).

Under Block invalid items:

  • Stop workflow fails the step with the first mismatch, path first, for example body.total: expected number, got string. A node that runs once for the whole batch then does not run at all. A node that runs once per item, such as HTTP Request, Slack or Gmail, can still run for the valid items, and send or write for them, before the run fails.
  • Continue (error output) sends the invalid items to the node's error output and runs the node on the rest.
  • Continue (regular output) adds the invalid items to the normal output as error items and runs the node on the rest.

Only what a node receives is ever enforced; what it emits never is. A disabled node is skipped, not checked. A node that enforces its input wears a shield on the canvas (Enforces its input shape at run time).

The schema editor

Declare a shape, Expect a shape and an AI Agent's output schema all open the same editor: a table with one row per field.

  • Field name, Type and Required for each field. The types are string, number, integer, boolean, object, array and any.
  • Show details opens a field's Description and, for an object or a list, the fields inside it — Items for the entries of a list — one level per expansion.
  • Add field and Remove field change the table.
  • Allow other fields — off, the list is complete: an item carries no other fields, so Crios can also warn when an expression reads one that is not listed. On an expected shape, it also means that under Warn and continue or Block invalid items an item with any other field does not match. It is off for a new shape, including the one Expect a shape starts from; turn it on when items may carry more than you listed.
  • Infer from sample fills the table from data: paste one item's JSON, or an array of items, and click Infer, or take the fields from From last run. Input it cannot read is refused with Not valid JSON, or nothing to read from it.
  • Raw JSON shows the shape as JSON Schema to edit directly, and Clear removes it. In Read-only or Debug (see Editor modes), Raw JSON opens read-only: the JSON can be selected and copied, not changed.

An empty table says No fields yet — add one, infer them from a sample, or pick a named schema.

Named schemas

A shape you need in several places can be written once and referenced everywhere else:

  • Save as named schema… moves the shape into the workflow's named schemas under a name — 1 to 64 characters, starting with a letter, then letters, digits, _ or - — and leaves a reference in its place. Saving under a name that exists replaces that schema, and the editor warns first: Replaces the existing schema ….
  • Any schema editor in the workflow can then pick it from its named schema list instead of Inline, the shape written in place. A picked schema shows read-only — Shared from the workflow's named schemas — detach to edit a copy here. — and Detach copies it back in place, to change it there alone.
  • The Data tab lists the workflow's Named schemas, each with its fields and its number of uses. Remove works only once nothing uses the schema any more (Referenced — detach every use first.).

Named schemas are part of the workflow, so they are saved and versioned with it.

What saving checks

Shapes add these findings to the Problems panel (see Building a workflow):

Code What it means Blocks
schema_input_missing, schema_input_type A field the node expects is missing from what arrives, or has another type. Nothing
expression_field_type An expression uses a field in a way its type does not allow — arithmetic on a text field, for example — so it would fail at run time. The message says how to convert the value first. Nothing
shape_binary_dropped A node reads an item's attachments, but a step on the way drops them, so none arrive. Nothing
schema_json_key A shape was written with a top-level json object, the wrapper around an item, instead of the item's own fields. Fields sit directly under item.json. Nothing
schema_invalid, schema_unknown_port, schema_ref_unresolved, schema_enforce_without_input A shape that is not an object schema, a declaration for a port the node does not have, a reference to a named schema that does not exist, or an At run time option with no expected shape. Saving