Appearance
Set node
The Set node copies a value into a new variable — either lifting a value out of an existing reference or storing a fixed literal. It's how you give a value a stable, well-named home so later nodes can read it cleanly.
Component id: flowrunner/set.
How it works
Set reads a source and writes it under a variable name. The engine decides between two modes by looking at the source string:
- Reference copy — if the source contains a dot and the part before the first dot is a namespace that exists in refs, Set copies
refs[namespace][field]into the new variable. - Literal — otherwise the source is treated as a literal string, with
${env.X}and${secrets.X}resolved first.
The engine splits the reference on the first dot only: start.email reads the email field from the start namespace. (A deeper path like start.user.name would look for a field literally called user.name, so Set works best for top-level fields — use a Template node for nested paths.)
How the value is stored
- If the resolved value is a plain object, it's stored as-is — read its fields with
variable.field. - If it's a scalar (string, number, boolean) or an array, it's wrapped as
{ value: <the value> }— read it back withvariable.value.
Config
| Field | Required | Description |
|---|---|---|
var | No (default value) | The name of the variable to create. |
source | Yes | Either a dotted reference (start.email) to copy, or a literal string. Literals resolve ${env.X} / ${secrets.X}. |
Ports
Set has a single next port. It only fails if something unexpected throws — in which case an unhandled failure surfaces as an error, or routes to a wired error port.
Examples
Copy a request field into a clearly-named variable:
text
Set var: chosen source: start.email
# → refs.chosen = { value: "a@b.com" }
# read later as: chosen.valueStore a fixed literal (useful for tagging a branch):
text
Set var: tier source: premium
# → refs.tier = { value: "premium" }Pull a value in from a secret:
text
Set var: apiBase source: ${env.API_BASE_URL}
# → refs.apiBase = { value: "https://api.example.com" }TIP
Copying an object source (like a whole start bucket) preserves its shape, so you can read variable.field directly. Scalar and literal sources are always wrapped, so remember the extra .value.