--- title: 'Set Variable' description: 'Store a computed or referenced value for later nodes to read.' --- # Set Variable Writes a value into the workflow execution context under a named key. Downstream nodes can then reference `{{.data.value}}` to read it. ## When to use - You need to compute a value once and reuse it in multiple downstream nodes. - You want to give an opaque chain of references a friendlier name to reference later (e.g. compute a customer ID in node A and read it everywhere else as `{{customer_id.data.value}}`). - You're stitching together values from multiple upstream nodes into a single place. ## Configuration | Field | Required | What it does | |---|---|---| | `key` | Yes | Logical name of the variable. Used for readability only — downstream refs use the node ID, not the `key`. | | `value` | — | Any static or referenced value. Supports full `{{...}}` syntax including arithmetic on referenced numbers. | ## What it outputs ``` { key: "customer_id", value: } ``` Downstream references use the node ID: `{{.data.value}}`. ## When NOT to use it If you only need the value in one downstream node, just reference the source directly with `{{upstream_node.data.path}}`. Set Variable is for *sharing* a value across multiple downstream consumers. For transforming a value into a new shape, use **Transform** — it's purpose-built for field mapping, whereas Set Variable just stores whatever value you give it.