Join icon

Join

Waits for all parallel inputs and combines them into a single JSON object

Overview

This node, named "Join," is designed to synchronize and combine multiple parallel workflow branches into a single output. It waits for a specified number of parallel inputs before proceeding, effectively merging data from concurrent executions into one consolidated JSON object.

Common scenarios where this node is beneficial include:

  • Combining results from multiple API calls executed in parallel.
  • Aggregating data processed in separate branches of a workflow before further processing.
  • Synchronizing asynchronous tasks that run concurrently but need to be joined for subsequent steps.

For example, if a workflow splits into three parallel branches fetching different datasets, the Join node can wait for all three to complete and then merge their outputs into one structured JSON object for downstream use.

Properties

Name Meaning
Expected Inputs Number of parallel inputs to wait for before joining (between 2 and 99).
Timeout (Seconds) Maximum time in seconds to wait for all expected inputs before throwing a timeout error.
Include Metadata Whether to include additional execution metadata (timestamps, source info, counts) in the output.

Output

The node outputs a single JSON object combining all received inputs. The structure depends on whether metadata inclusion is enabled:

  • Without metadata:
    The output JSON contains keys like input_1, input_2, ..., each holding the JSON data from the corresponding input branch.

  • With metadata:
    The output JSON has two main fields:

    • data: An object with keys input_1, input_2, etc., containing the input data.
    • metadata: An object providing detailed information about each input such as timestamps, execution indices, source identifiers, item counts, and whether the input was an array. It also includes total inputs count, overall execution time, and wait duration.

The node does not output binary data.

Dependencies

  • No external services or APIs are required by this node itself.
  • It relies on n8n's internal workflow execution context to track inputs and timing.
  • No special credentials or environment variables are needed.

Troubleshooting

  • Timeout errors:
    If the node times out waiting for inputs, it throws an error indicating how many inputs were received versus expected. To resolve, ensure all parallel branches reach this node within the configured timeout period or increase the timeout value.

  • No input data received:
    If the node receives no input at all, it will throw an error. Verify that upstream nodes are correctly connected and producing output.

  • Data ordering issues:
    The node sorts inputs by a source identifier derived from paired items to maintain consistent ordering. If source identification fails, it falls back to input order. Unexpected ordering might occur if paired item metadata is missing or malformed.

  • Memory persistence:
    The node uses a global in-memory store keyed by workflow ID, node ID, and execution ID to accumulate inputs. If the workflow is stopped or restarted mid-execution, stored data may be lost, causing incomplete joins.

Links and References

Discussion