Merge

logic.merge Logic v0.1.0

Combine the items of multiple inputs — append, combine by matching fields / position / all combinations, or choose one branch.

Finding it in the library

Search the builder's node library for Merge (it lives under Logic). A single click opens the in-editor docs panel shown here — description, ports, and every property, without leaving the canvas. Double-click (or drag) to add it to the workflow.

Library capture pending — regenerate with npm run shots:nodes.

Wired up in the builder

Merge in a real, runnable flow — captured live from the Studio editor, exactly as it looks on your canvas. This is the same workflow used for the example input & output below.

Canvas capture pending — regenerate with npm run shots:nodes.

How it’s configured

The node’s Configure panel as it opens in the builder when you select the step — every setting laid out with real values. Click any field to edit it.

Config capture pending — regenerate with npm run shots:nodes. See the full property reference below.

Ports

Ports are the node’s contract with its neighbours. In the editor a port label renders bold when wired and italic when optional; ports accept attachment carriers rather than data wires.

DirectionPortLabelWhat flows through it
Inputinput1Input 1
Inputinput2Input 2
OutputoutputOutput

Input handles follow `numberInputs` (Input 1 … Input N, 2–10). Combine-by-matching-fields always uses exactly two inputs.

How data flows through it

Merge consumes the content of the incoming envelope — when it is fed directly by a trigger, the trigger’s wrapper is unwrapped at the node boundary so the node sees the actual data, not the metadata shell. Its output becomes the payload for the next node, while the envelope (trace ids, correlation, binary refs) rides along untouched. In the Runs view you always see the whole envelope for both sides of this node.

Expressions in the config

None of this node’s properties are string-typed, so {{ }} expressions don’t apply here — JSON- and code-typed fields are always taken literally.

Build it with AI

Every node in this reference is reachable through Flowdrome’s AI Copilot and the MCP tools — say what you want, and the graph surgery happens server-side. Node types resolve fuzzily, so the catalog label (Merge) works as well as the exact type id (logic.merge).

In the Copilot panel (or any connected AI):

add a merge node after the trigger

As a step in a create_chain_workflow call:

{"type":"Merge","config":{}}
Raw MCP call — add this node to a workflow with add_node
curl -s -X POST http://localhost:48170/mcp -H "content-type: application/json" -d '{ "jsonrpc": "2.0", "id": "1", "method": "tools/call", "params": { "name": "add_node", "arguments": { "workflowId": "<id>", "type": "Merge" } } }'

Example input & output

Captured from a real test run of the workflow above — this is what you see in the run data panel after pressing Test workflow.

Input — what the node received

[
  [
    {
      "id": 1,
      "a": true
    }
  ],
  [
    {
      "id": 2,
      "b": true
    }
  ]
]

Output — what the node produced

[
  {
    "id": 1,
    "a": true
  },
  {
    "id": 2,
    "b": true
  }
]

Property reference

Every setting, with its type and default — the same fields shown configured in the panel above.

PropertyTypeDefaultDescription
Mode
mode
select "append" Append all inputs, combine matching items together, or output one chosen branch unchanged.
appendchooseBranchcombine
Combine by
combineBy
select "combineByFields" How items from the inputs are paired up before merging.
combineAllcombineByFieldscombineByPosition
Shown when mode === "combine"
Number of inputs
numberInputs
int 2 How many inputs to merge (2–10). Combine by matching fields always uses exactly 2.
Shown when !isCombineFields(c)
Fields to match
fieldsToMatch
field-map [{"field1":"id","field2":"id"}] Match a field on Input 1 against a field on Input 2 — pick each from the data flowing into that input. Two items match when these are equal.
Shown when mode === "combine" && (combineBy ?? "combineByFields") === "combineByFields"
Output type
joinMode
select "keepMatches" Which items to output: only matches, only non-matches, everything, or all of one input enriched with the other.
enrichInput1enrichInput2keepEverythingkeepMatcheskeepNonMatches
Shown when mode === "combine" && (combineBy ?? "combineByFields") === "combineByFields"
Output data from
outputDataFrom
select "both" For matched items, output the merged pair or only one input's data.
bothinput1input2
Shown when isCombineFields(c) && (joinMode ?? "keepMatches") === "keepMatches"
Multiple matches
multipleMatches
select "all" Output every matching pair, or only the first match per item.
allfirst
Shown when mode === "combine" && (combineBy ?? "combineByFields") === "combineByFields"
Fuzzy compare
fuzzyCompare
boolean false Loosely compare values, so e.g. the number 3 and the string "3" are treated as equal.
Shown when mode === "combine" && (combineBy ?? "combineByFields") === "combineByFields"
Disable dot notation
disableDotNotation
boolean false Treat field names literally instead of interpreting dots as nested paths.
Shown when mode === "combine" && (combineBy ?? "combineByFields") === "combineByFields"
Include unpaired items
includeUnpaired
boolean false When the inputs differ in length, also output the left-over (unpaired) items.
Shown when mode === "combine" && combineBy === "combineByPosition"
Clash handling
clashHandling
select "preferInput2" When merged items share a field name, choose which value wins — or keep both by suffixing the input number.
addSuffixpreferInput1preferInput2
Shown when mode === "combine"
Output
chooseBranchOutput
select "input1" Which input's data to output unchanged, or a single empty item.
emptyinput1input2
Shown when mode === "chooseBranch"

Using it

Join two branches by position

In the capture above, two sources fan in to one Merge — each branch lands on its own input pin (Input 1, Input 2), and the example output shows the result: one list containing both items. That is append mode, the default.

Switching Mode to combine and Combine by to position pairs item n of Input 1 with item n of Input 2 into a single merged object — the classic “fork, do two things, join the results” shape. Clash handling decides which side wins when both branches produced the same field; because the engine orders inputs by target port, “prefer Input 2” is a stable, meaningful choice, not a race.

Join two datasets by key

Combine by matching fields is the SQL-ish join: in Fields to match, add a row pairing the key field of Input 1 (say id) with the key field of Input 2 (say orderId). Join mode picks the family — keep matches (inner join), keep non-matches, or keep everything (enrich) — and Output data from chooses whether merged items carry both sides or just one.

Tips

  • Input order is deterministic. The engine orders by target port — input1 is Input 1, always — so “which branch wins on a field clash” is a real, stable choice.
  • Number of inputs redraws the node’s input pins live (2–10). Combine-by-matching-fields always uses exactly two.
  • chooseBranch mode passes one input through untouched (or a single empty item) — useful as an explicit synchronization point.
  • Merge emits a list. If exactly one item comes out and the next node wants the bare item, follow with Limit and its unwrapSingle option.
  • Fuzzy compare treats 3 and "3" as equal when matching fields.

Related nodes

The rest of the Logic group — the same folder you’d scan in the editor’s library.

This page is generated from the node registry by gen-node-docs.mjs on every site build — ports, properties, defaults and visibility rules cannot drift from the code. The screenshots and example data are captured from a live Flowdrome by npm run shots:nodes and npm run gen:examples. The hand-authored notes above are merged in.