> For the complete documentation index, see [llms.txt](https://docs.n8n.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.n8n.io/build/work-with-data/transform-data/expression-reference/nodeinputdata.md).

# Nodeinputdata

## `$input`.**`all()`** <a href="#dollarinputall" id="dollarinputall"></a>

**Description:** Returns an array of the current node’s input items

**Syntax:** `$input`.all(branchIndex?, runIndex?)

**Returns:** Array

**Source:** Custom n8n functionality

**Parameters:**

* `branchIndex` (Number) - optional - The output branch index of the node to use. Defaults to the first branch (index 0)
* `runIndex` (Number) - optional - The run of the node to use. Defaults to the first run (index 0)

## `$input`.**`first()`** <a href="#dollarinputfirst" id="dollarinputfirst"></a>

**Description:** Returns the current node’s first input item

**Syntax:** `$input`.first(branchIndex?, runIndex?)

**Returns:** Item

**Source:** Custom n8n functionality

**Parameters:**

* `branchIndex` (Number) - optional - The output branch index of the node to use. Defaults to the first branch (index 0)
* `runIndex` (Number) - optional - The run of the node to use. Defaults to the first run (index 0)

## `$input`.**`item`** <a href="#dollarinputitem" id="dollarinputitem"></a>

**Description:** Returns the input item currently being processed

**Syntax:** `$input`.`$input`.**`item`**

**Returns:** Item

**Source:** Custom n8n functionality

## `$input`.**`last()`** <a href="#dollarinputlast" id="dollarinputlast"></a>

**Description:** Returns the current node’s last input item

**Syntax:** `$input`.last(branchIndex?, runIndex?)

**Returns:** Item

**Source:** Custom n8n functionality

**Parameters:**

* `branchIndex` (Number) - optional - The output branch index of the node to use. Defaults to the first branch (index 0)
* `runIndex` (Number) - optional - The run of the node to use. Defaults to the first run (index 0)

## `$input`.**`params`** <a href="#dollarinputparams" id="dollarinputparams"></a>

**Description:** The configuration settings of the current node. These are the parameters you fill out within the node when configuring it (e.g. its operation).

**Syntax:** `$input`.`$input`.**`params`**

**Returns:** NodeParams

**Source:** Custom n8n functionality


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.n8n.io/build/work-with-data/transform-data/expression-reference/nodeinputdata.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
