Skip to main content

Aggregator Node

The Aggregator Node unifies variables from multiple branches into one output. It evaluates items in order and returns the first valid value.

Aggregator Node in Canvas

How It Works

  1. You add a list of sources in priority order.
  2. The Aggregator checks the first source, then the next one.
  3. As soon as it finds a valid value, it returns the result.
  4. If a source is empty, it automatically moves on.

Configuration Modes

You can use the Aggregator in two ways.

1. Unstructured output

Use this mode when you want to return one single value.

{
"config": {
"assign_variables": [
"{{primary.result}}",
"{{secondary.result}}",
"{{fallback.value}}"
]
}
}
{ "output": "value_from_first_valid_branch" }

Configuration

In the side panel:

  1. Click Add to include new input options.
  2. Organize them in priority order (the first is the most important).
  3. If you want a response with fixed fields, enable structured output mode (below).

Aggregator unstructured mode

2. Structured output

Use this mode when you need a fixed set of fields.

{
"config": {
"assign_variables": [
{"result": "{{branch1.result}}", "status": "{{branch1.status}}"},
{"result": "{{branch2.result}}", "status": "{{branch2.status}}"}
],
"output_schema": ["result", "status"]
}
}
{
"output": {
"result": "value_from_branch1",
"status": "success"
}
}

Configuration

In the side panel:

  1. Add output keys with the Add Key button and choose each name.
  2. Add the variable groups you want to compare.
  3. Select variables for each key in each group.
  4. The Aggregator compares groups in order and returns the first set of keys with valid values; the output follows the structure of the defined keys.

Aggregator structured mode

Output

  • output in unstructured mode: single value.
  • output in structured mode: object with defined fields.

Practical Example

Imagine you want to fetch a response from 3 places:

{
"assign_variables": [
"{{api_response.data}}",
"{{cache.value}}",
"{{default.value}}"
]
}

Result:

  1. The node tries api_response.data.
  2. If it is empty, it tries cache.value.
  3. If that is also empty, it uses default.value.