On this page
Sommatic Docs
Open portal

Input Access

The same input in item form: the current item and the list of items.

View as Markdown
Open in

Each example was run against the deployed expression engine over the example context at the end of the page.

$input.item

$input.item

The input of the current node in item form: json is the same object as $json and binary is $binary (always {}). Useful when an expression is written in the item style of other tools.

Examples

{{ $input.item.json.body.order_id }}
Result string
"ord_1042"
{{ Object.keys($input.item) }}
Result list
["json","binary"]

Notes

  • Inside a code.js node, $input is a different thing: the input object itself, without the { json } wrapper. See code nodes.

In JSONata $$input.item.json.body.order_id

$input.all()

$input.all()

Returns the input items as a list of { json, binary }. A node handles one item per execution, so the list always has exactly one element: $input.all()[0].json is $json. To work with the elements of a list in the data, use the list itself ($json.body.items).

Examples

{{ $input.all().length }}
Result number
1
{{ $input.all()[0].json.body.email }}
Result string

In JSONata Functions cannot be called from JSONata; read $$input.item.json instead.

$input.first()

$input.first()

Returns the first input item, { json, binary }: the current item, since there is only one. Equivalent to $input.all()[0] and to $input.item.

Examples

{{ $input.first().json.body.customer.name }}
Result string
"Ana Pérez"

In JSONata Functions cannot be called from JSONata; read $$input.item.json instead.

$input.last()

$input.last()

Returns the last input item, { json, binary }: the current item, since there is only one.

Examples

{{ $input.last().json.body.order_id }}
Result string
"ord_1042"

In JSONata Functions cannot be called from JSONata; read $$input.item.json instead.

$input.params

Reserved. Not filled by the engine: today it is always {}.

$input.params

Meant to expose the configuration parameters of the node that produced the input. The engine does not pass them: it is always an empty object. To reuse a value from an earlier node's configuration, have that node return it in its output, or repeat it.

Examples

{{ $input.params }}
Result object
{}

In JSONata $$input.params

$input.context

Reserved. Not filled by the engine: today it is always {}.

$input.context

Meant to carry context data from the node that produced the input. The engine does not fill it: it is always an empty object. Data that must travel between nodes goes in their output, read with $json or $('…').

Examples

{{ $input.context }}
Result object
{}

In JSONata $$input.context

Example context

The examples run over this data: the input of the current node ($json), the nodes that already ran ($(…)), the ids of the run and the current node. The clock is fixed at 2026-11-26T14:30:00.000Z and the server zone is UTC, so $now and $today give the same values on every page.

Input of the current node JSON
{
  "$json": {
    "body": {
      "order_id": "ord_1042",
      "email": "[email protected]",
      "customer": {
        "name": "Ana Pérez",
        "segment": "gold"
      },
      "priority": "",
      "items": [
        {
          "sku": "A-100",
          "qty": 2,
          "price": 10.5
        },
        {
          "sku": "B-200",
          "qty": 0,
          "price": 4
        },
        {
          "sku": "C-300",
          "qty": 1,
          "price": 25
        }
      ],
      "tags": [
        "new",
        "web",
        "new"
      ],
      "created_at": "2026-11-25T09:15:00Z"
    },
    "headers": {
      "content-type": "application/json"
    },
    "query": {},
    "method": "POST"
  }
}
Nodes that already ran (label → output) JSON
{
  "Webhook Receiver": "= $json",
  "Normalize input": {
    "correlation_id": "c-7f3a",
    "channel": "web"
  },
  "Classify": {
    "label": "billing",
    "confidence": 0.92
  }
}
Run and current node JSON
{
  "$execution": {
    "id": "fir-xxxx",
    "flow_instance_id": "fi-xxxx",
    "flow_definition_id": "fd-xxxx",
    "flow_version_id": "fv-xxxx",
    "flow_slug": "order-intake"
  },
  "$node": {
    "id": "node-notify",
    "label": "Notify customer"
  }
}

Examples run against the orchestrator at commit 31e874b

Install agent tools

Give your coding agent the official Sommatic AI docs: skills, the docs MCP server and Markdown pages, so it never has to scrape the site.

Skills only. They do not update by themselves; run it again to refresh.

npx skills add https://docs.sommatic.ai
How agents read these docs