> 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/customdata.md).

# Customdata

## `$execution.customData`.**`get()`** <a href="#dollarexecutioncustomdataget" id="dollarexecutioncustomdataget"></a>

**Description:** Returns the custom execution data stored under the given key. [More info](https://github.com/n8n-io/n8n-docs/blob/main/workflows/executions/custom-executions-data/README.md)

**Syntax:** `$execution.customData`.get(key)

**Returns:** String

**Source:** Custom n8n functionality

**Parameters:**

* `key` (String) - The key (identifier) under which the data is stored

**Examples:**

```javascript
// Get the user's email (which was previously stored)
$execution.customData.get("user_email") //=> "me@example.com"
```

## `$execution.customData`.**`getAll()`** <a href="#dollarexecutioncustomdatagetall" id="dollarexecutioncustomdatagetall"></a>

**Description:** Returns all the key-value pairs of custom data that have been set in the current execution. [More info](https://github.com/n8n-io/n8n-docs/blob/main/workflows/executions/custom-executions-data/README.md)

**Syntax:** `$execution.customData`.getAll()

**Returns:** Object

**Source:** Custom n8n functionality

**Examples:**

```javascript
$execution.customData.getAll() //=> {"user_email": "me@example.com", "id": 1234}
```

## `$execution.customData`.**`set()`** <a href="#dollarexecutioncustomdataset" id="dollarexecutioncustomdataset"></a>

**Description:** Stores custom execution data under the key specified. Use this to easily filter executions by this data. [More info](https://github.com/n8n-io/n8n-docs/blob/main/workflows/executions/custom-executions-data/README.md)

**Syntax:** `$execution.customData`.set(key, value)

**Source:** Custom n8n functionality

**Parameters:**

* `key` (String) - The key (identifier) under which the data is stored
* `value` (String) - The data to store

**Examples:**

```javascript
// Store the user's email, to easily retrieve all execs related to that user later
$execution.customData.set("user_email", "me@example.com")
```

## `$execution.customData`.**`setAll()`** <a href="#dollarexecutioncustomdatasetall" id="dollarexecutioncustomdatasetall"></a>

**Description:** Sets multiple key-value pairs of custom data for the execution. Use this to easily filter executions by this data. [More info](https://github.com/n8n-io/n8n-docs/blob/main/workflows/executions/custom-executions-data/README.md)

**Syntax:** `$execution.customData`.setAll(obj)

**Source:** Custom n8n functionality

**Parameters:**

* `obj` (Object) - A JavaScript object containing key-value pairs of the data to set

**Examples:**

```javascript
$execution.customData.setAll({"user_email": "me@example.com", "id": 1234})
```


---

# 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/customdata.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.
