> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dify.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Variable Aggregator

> Converge exclusive workflow branches into a single output

Use the Variable Aggregator node to converge **exclusive** workflow branches into a single output, so you only need to define downstream processing once.

Nodes like If/Else and Question Classifier create exclusive branches—only one path executes per run. When these branches produce the same type of output, you would normally duplicate downstream nodes on every branch.

The Variable Aggregator eliminates this duplication. It provides a single output variable for downstream nodes to reference, regardless of which branch ran.

<Frame caption="Without Variable Aggregator">
  <img src="https://mintcdn.com/dify-6c0370d8/gyesM3ime6gTaYSO/images/use-dify/workflow/without-variable-aggregator.png?fit=max&auto=format&n=gyesM3ime6gTaYSO&q=85&s=8357ace66100006f2c94ac3a7c50832d" alt="Without Variable Aggregator" width="1764" height="496" data-path="images/use-dify/workflow/without-variable-aggregator.png" />
</Frame>

<Frame caption="With Variable Aggregator">
  <img src="https://mintcdn.com/dify-6c0370d8/gyesM3ime6gTaYSO/images/use-dify/workflow/with-variable-aggregator.png?fit=max&auto=format&n=gyesM3ime6gTaYSO&q=85&s=ec55e2e66e40a5f17ab1eec66f3c35bc" alt="With Variable Aggregator" width="2072" height="562" data-path="images/use-dify/workflow/with-variable-aggregator.png" />
</Frame>

<Note>
  The Variable Aggregator is designed for exclusive branches where **only one path runs at a time**. It does not combine outputs from multiple branches that execute in parallel.

  To merge results from parallel branches, use a [Code](/en/use-dify/nodes/code) or [Template](/en/use-dify/nodes/template) node.
</Note>

## Select the Variables to Converge

From each branch, add variables that need the same downstream processing. All variables must share the same data type.

Supported types: `string`, `number`, `object`, `boolean`, `array`, `file`.

The node outputs whichever variable has a value at runtime. Since only one branch executes, only one variable will have a value, and that value becomes the node's output.

## Converge Multiple Sets of Variables

When you have multiple sets of variables that each need to be converged separately, enable **Aggregation Group** to create groups within a single Variable Aggregator.

Each group converges its own set of variables and produces a separate output.
