Variables
Pass data between nodes using variables and expressions
Overview
Variables let you pass data from one node to another within a workflow. When a node produces output (like extracted text, a page title, or an API response), you can reference that output in any subsequent node using variable expressions.
There are two types of variables in Prompteryx:
Simple named variables created by nodes that have a Target Variable field. Referenced with {{variableName}}.
Example: A Get Page Title node with Target Variable set topageTitle creates a variable you can use as {{pageTitle}}.
Expressions that reference the output of a specific node by name. Referenced with {{$('Node Name').item.json.field}}.
Example: {{$('Open Google').item.json.title}} gets the title field from the Open Google node's output.
Inserting Variables
You can insert variables into any text field that supports them. Look for the{x} button next to input fields — this opens the variable insertion popover.
1. Click the {x} button next to any supported input field.
2. The popover shows two sections:
- Your Variables — User-defined variables from previous nodes (purple chips)
- Node Outputs — Output fields from any previous node, browsable via a tree view
3. Click a variable or output field to insert it at the cursor position.
4. The variable expression is inserted wrapped in {{ }} delimiters.
When a field contains variables, they are displayed as colored chips when the field is not focused:
- • Purple chips = User variables (
{{pageTitle}}) - • Blue chips = Node output expressions (
{{$('Node').item.json.field}}) - • Hover a chip to see the full expression and source node
- • Click the X on a chip to remove the variable
- • Click the field to switch to raw text editing mode
Creating User Variables
Many browser nodes have a Target Variable field in their configuration. When you set a name in this field, the node's output is stored as a named variable that you can reference later with the simple {{variableName}} syntax.
Nodes that support Target Variable
These node types can create user variables:
Expression Syntax Reference
| Expression | Description | Example |
|---|---|---|
{{varName}} | Reference a user variable by name | {{pageTitle}} |
{{$('Node Name').item.json.field}} | Reference a field from a node's output | {{$('Get Title').item.json.title}} |
{{$('Node').item.json.nested.field}} | Access nested fields using dot notation | {{$('API Call').item.json.data.name}} |
{{$('Node').item.json.list[0].field}} | Pick an element of an array field by index (0-based) | {{$('API Call').item.json.data[2].email}} |
{x} button to browse and insert variables visually. The correct expression is generated automatically.Common Use Cases
Extract a title from one page, then use it as search text on another page:
productNamehttps://amazon.com{{productName}}Combine multiple variables into a message:
Use boolean variables from state checks in If/Else conditions:
loginVisible{{loginVisible}} equals true