The Variable Processing Node enables data formatting, composition, and aggregation—ensuring outputs flow to downstream nodes in the desired structure. Use it to apply consistent formatting to outputs, assemble data into JSON objects, or aggregate results from multiple parallel branches while avoiding null-value errors.
Click the dropdown under Output Mode to select one of three supported modes.
Enter content directly in the editor—or type
Converts input variables into a formatted JSON object.
Aggregation Group mode selects one valid (non-null) value from multiple candidate variables using a predefined strategy.
Disabled by default. Only applicable when invoking the workflow via API—controls whether this node’s output appears in the final response. This feature will be deprecated soon.
The node’s output is stored in its output variable(s), accessible to downstream nodes.
Each configured variable becomes a top-level field in the output object, with its name and actual value preserved.
Each group maps to a dedicated output variable named after the group (e.g.,
No. JSON Output Mode produces flat, single-level key-value objects where all values are strings. For nested structures (e.g., arrays or nested objects), perform secondary processing in a downstream node.
Adding the Node
Method 1: Using the "+" Button
- Click the
+button at the end of any existing node on the canvas. - Select Variable Processing Node from the pop-up node list.
- The node is automatically added to the canvas and connected to the upstream node.
Method 2: Drag-and-Drop
- Locate the Variable Processing Node in the left-hand node library.
- Drag it onto the canvas at your desired position.
- Manually connect it to an upstream node by dragging from the upstream node’s output port to the Variable Processing Node’s input port.
Core Configuration
Output Mode
Click the dropdown under Output Mode to select one of three supported modes.
Text Output
Enter content directly in the editor—or type / to insert upstream node outputs or session variables, e.g.:
- Simple variable reference: Insert
/Start Node/query→ outputs user input - Formatted output: Add static text around variables, e.g.,
Hello! Your question is: {{Start Node/query}}. I’ll respond shortly. - Multi-variable composition: Combine variables and text, e.g.,
User {{Start Node/name}}'s query "{{Start Node/query}}" has been processed. Result: {{LLM Node/result}}.
JSON Output
Converts input variables into a formatted JSON object.
| Column | Type | Required | Description |
|---|---|---|---|
| Variable Name | String | Yes | Key name for the JSON field. Supports letters, digits, and underscores only. Must be non-empty and contain no special characters. Use meaningful names (e.g., name, question, answer). |
| Reference Type | Option | Yes | Input: Enter literal text directly. Reference: Select an upstream node output or built-in variable via /. |
| Value | String | Yes | For Input: enter raw text. For Reference: type / to open the variable picker and select the desired variable. |
Aggregation Group
Aggregation Group mode selects one valid (non-null) value from multiple candidate variables using a predefined strategy.
| Option | Description | Example |
|---|---|---|
| Return the first non-null value in each group | Default. Returns the first non-null variable in order. Ideal for aggregating conditional branches—guarantees a valid value regardless of which branch executes. | Group contains var1 (null), var2 ("value2"), var3 ("value3") → outputs "value2". |
| Return the last non-null value in each group | Returns the last non-null variable in order. Useful when you need the most recent value. | Group contains var1 ("value1"), var2 (null), var3 ("value3") → outputs "value3". |
Return Result
Disabled by default. Only applicable when invoking the workflow via API—controls whether this node’s output appears in the final response. This feature will be deprecated soon.
Output Variable
The node’s output is stored in its output variable(s), accessible to downstream nodes.
Text Output Mode
- Output variable name:
result - Type:
String - Value: Final rendered text—including interpolated variables and static content.
| Variable Name | Type | Description |
|---|---|---|
result | String | Rendered text combining variable references and static content. |
JSON Output Mode
- Output variable name:
result - Type:
Object - Value: Full JSON object, e.g.,
{"variableName1":"value1","variableName2":"value2",...}.
| Variable Name | Type | Description |
|---|---|---|
result | Object | Contains full JSON object with key-value pairs. |
Aggregation Group Mode
Each group maps to a dedicated output variable named after the group (e.g., Group1, Group2). All output variables are of type String, containing the selected non-null value.
| Variable Name | Type | Description |
|---|---|---|
Group1 | String | Output variable for the first group; holds the selected non-null value (first or last). |
Group2 | String | Output variable for the second group (if multiple groups exist); holds the selected non-null value. |
Common Use Cases
| Paired Node | Output Mode | Typical Use Case |
|---|---|---|
| LLM Node → | Text Output | Format LLM output—add prefixes/suffixes or combine multiple variables. |
| LLM Node → | Variable Processing Node → API Node | JSON Output: Bundle extracted fields into a JSON object for API consumption. Ideal for structured data exchange. |
| Variable Processing Node → | HTTP Node | JSON Output: Format variables as JSON for external system integration or storage. |
| Conditional Judgment Node → | Variable Processing Node (Aggregation Group) | Aggregate outputs across conditional branches—automatically select valid output and prevent null errors downstream. |
| Intent Classification Node → | Variable Processing Node (Aggregation Group) | Aggregate intent-specific results into a unified payload before passing to downstream nodes—ensuring robust workflow execution. |
| Variable Processing Node → | LLM Node | Aggregation Group: Feed aggregated context into LLM for coherent reasoning. |