> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ingestly.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Variable

> Define named values in a pipeline so downstream nodes can reference them by name.

The **Variable** action node assigns one or more named values from template expressions. Each entry becomes a field on the node's payload that downstream nodes can reference as `{{varNode.payload.varName}}`.

## When to use Variable

* You want to **name a derived value once** and reuse it in multiple downstream nodes (e.g., a normalized customer email or an amount threshold).
* You need a **constant** that several branches depend on, so you can edit it in one place.
* A [Transform script](/nodes/transform) or a [Condition edge](/guides/conditional-routing) needs a value that is easier to read with a short name than as a long path expression.

For one-off math or reshape work, use [Transform](/nodes/transform). For per-item iteration, use [Loop](/nodes/loop).

## Configuration

| Field         | Type | Required | Description                       |
| ------------- | ---- | -------- | --------------------------------- |
| **Variables** | list | Yes      | One or more name/expression pairs |

Each row has two fields:

* **Name:** the field name on the variable node's payload. Use a JS-style identifier (`customerEmail`, `amountLimit`).
* **Expression:** a template expression like `{{extract.payload.email}}`, `{{today | addDays: 30 | formatDate: 'yyyy-MM-dd'}}`, or a literal string.

## Output

The node's payload is an object with one key per variable assignment.

```json theme={null}
{
  "customerEmail": "alice@example.com",
  "amountLimit": 5000
}
```

Reference downstream as:

* `{{vars.payload.customerEmail}}` from a template field
* `vars.payload.amountLimit` from a [Transform script](/nodes/transform)

(`vars` here is the node name; pick whatever name the variable node has in your pipeline.)

## Inputs and outputs

**Allowed inputs:** Any upstream node.

**Output:** A flat object whose keys are the configured variable names.

## Credits

Variable nodes are **free**. They consume 0 credits per execution.

## Related

<CardGroup cols={2}>
  <Card title="Expressions and filters" icon="braces" href="/guides/expressions">
    Template syntax for variable expressions
  </Card>

  <Card title="Transform" icon="arrow-right-arrow-left" href="/nodes/transform">
    Use named variables inside a transform script
  </Card>

  <Card title="Conditional routing" icon="code-branch" href="/guides/conditional-routing">
    Branch on a variable's value
  </Card>
</CardGroup>
