Skip to content

Merge

Category: Logic

Combines data from two input branches into a single output. Use this after parallel branches to rejoin the flow and combine results. The Merge node has two input handles (A and B) instead of the usual one.

When to use

  • Rejoin parallel branches after an IF node
  • Combine results from multiple HTTP requests
  • Aggregate data from different device queries
  • Collect outputs from separate processing chains

Configuration

  • Merge Mode — How to combine the input data:
    • Append — Combines all input data into an array: [inputA, inputB]
    • Combine — Merges input objects into one: { ...inputA, ...inputB }
    • Wait All — Waits for all inputs to complete, then passes them as an array
  • Combine Key (only for "Combine" mode) — If set, this key is excluded from the merge to avoid conflicts

Input handles

The Merge node has two input handles at the top:

  • A (left, purple) — connect the first input branch
  • B (right, purple) — connect the second input branch

Output data

  • {{ nodes['<id>'].data.merged }} — The combined data (array or object depending on mode)
  • {{ nodes['<id>'].data.inputCount }} — Number of inputs that had data

Append mode output

json
{
  "merged": [
    { "temperature": 22 },
    { "humidity": 65 }
  ],
  "inputCount": 2
}

Combine mode output

json
{
  "merged": {
    "temperature": 22,
    "humidity": 65,
    "pressure": 1013
  },
  "inputCount": 2
}

Examples

Combine two API responses:

  1. HTTP Request A → GET temperature API
  2. HTTP Request B → GET humidity API
  3. Merge (combine) → merges both responses
  4. Code → process combined data

Rejoin after IF branch:

  1. IF → is it daytime?
  2. True path → Set Device → bright lights
  3. False path → Set Device → dim lights
  4. Merge → continue after either branch completes

Tips

  • If one input branch hasn't produced output yet, Merge will only include the available inputs
  • Use "Append" mode when inputs are different types — you get an array to iterate over
  • Use "Combine" mode when inputs are objects you want to merge into one flat object
  • The Merge node processes in execution order — whichever branch completes first is included first