Node reference
Variable
Store a reusable value
Variable gives a value a name so later nodes on the path can reuse it. Use it for a setting, a message, or a useful part of an earlier result.
Try it step by step#
- Add name with the value Builder in one Variable node.
- Connect a second Variable and add greeting with the value Hello, {{name}}!.
- Run and inspect the second output. Change Builder to another name and compare the next run.
What to expect#
The second node emits {"greeting":"Hello, Builder!"}. Its output contains the variables it creates, while earlier values remain available through expressions on that path.
Things to check#
- Use an exact expression to keep a number, object, or array in its original form. Embedding an expression in a sentence produces text.
- Use separate nodes when one new variable depends on another new variable. Parameters are resolved before a node executes.
- Use State when a value must survive into the next run.
Keep learning#
Parameters#
| Setting | Default | What it does |
|---|---|---|
| Variables | [] | Names and values to make available to later nodes on this execution path. |
Inputs#
| Port | Value | Description |
|---|---|---|
in | any | Incoming value available to parameter expressions. |
Outputs#
| Port | Value | Description |
|---|---|---|
out | object | Only the variable created by this node. |