Skip to content
Developer & DevOps

Merge Wait vs Append Topology Divergence Harness

11 nodes 26 3 Manual trigger
Download

Loading workflow…

Workflow Description

A fully local harness that pushes the same input set through two topologies: an append path with two Code normalizers for branches A and B, an IF node detecting an explicit empty-branch marker, a NoOp placeholder and a 3-input Merge in append mode; and a simulated wait path whose Code gate forwards records only when every expected branch delivered items. A second Merge joins both outputs and a final Code node returns exactly one divergence report comparing count, keys and values element by element. A Set node appends harness version and guidance. No credentials, no external calls.

How it works

  1. 1.Manual Trigger fires with one empty item
  2. 2.Generate Dataset builds fictional records and stamps scenario and expectedBranches on each item
  3. 3.Branch A Items and Branch B Items normalize fields and carry scenario; empty branch B emits an __emptyBranch marker
  4. 4.Branch B Is Empty? routes the marker to NoOp and real records to Merge
  5. 5.Append Merge (append, 3 inputs) collects the append-path output
  6. 6.Simulated Wait Gate forwards records only if all expected branches arrived, else emits one blocked item
  7. 7.Merge Both Topologies joins both path outputs
  8. 8.Compare Topologies returns a single divergence report item
  9. 9.Divergence Summary adds harness version, schema note and action hint

Use cases

  • Verify Merge behaviour before an n8n version upgrade
  • Prove which topology yields full output when a branch is empty
  • Test multi-branch record normalization and invalid amount detection
  • Document merge behaviour when migrating workflows between environments

Requirements

  • n8n supporting the listed node typeVersions
  • No credentials and no network access
  • Replace Generate Dataset with your real source using schema {recordId, branch, label, amount}
  • Expected branch list comes from the expectedBranches field

Setup and testing in n8n

  1. Import the JSON and open the workflow
  2. Click Execute Workflow and inspect the single Divergence Summary item
  3. Confirm scenario=deliberate_empty_branch_B, appendRecordCount=2, simulatedWaitRecordCount=0 and divergent=true
  4. Add a branch B record in Generate Dataset and re-run: the gate should pass and counts should match
  5. Use a string amount to confirm amountValid=false

Service Value

Ready-made workflow template for automation delivery and service execution.

Apps Used

Manual Trigger Code If No Op Merge Set

Details

Trigger Manual trigger
Nodes 11
Apps 6
Views 26
Downloads 3

How to Use

  1. 1.Click "Download Template"
  2. 2.Open your n8n dashboard
  3. 3.Go to Workflows > Import from File
  4. 4.Select downloaded file and configure credentials

Nodes Used (11)

/

Manual Trigger

Manual Trigger

#1

Generate Dataset

Code

#2

Branch A Items

Code

#3

Branch B Items

Code

#4

Branch B Is Empty?

If

#5

Empty Branch Placeholder

No Op

#6

Append Merge

Merge

#7

Simulated Wait Gate

Code

#8

Merge Both Topologies

Merge

#9

Compare Topologies

Code

#10

Divergence Summary

Set

#11

Note Overview

Sticky Note

#12

Note Topologies

Sticky Note

#13

Note Report

Sticky Note

#14
Stay in the loop

Fresh workflows, straight to your inbox

Get newly published DROPIDEA workflows, a clear overview of what they do, and a link to explore them.

  • New workflows
  • Clear overviews
  • Setup guides

Be first to discover what is new

Your name, your email, and one confirmation.

Email confirmation · Unsubscribe anytime