Merge Append Grouping Associativity Test (Direct vs Left vs Right)
Loading workflow…
Workflow Description
A fully local diagnostic template that runs identical branch data through three topologies: one Merge with three inputs, a left-associative chain (A+B then +C), and a right-associative chain (B+C then A+(B+C)), all in append-only mode. It computes a stable fingerprint per item, compares final outputs as duplicate-preserving multisets, records checkpoint reports after each inner merge, counts filtered invalid records, and emits exactly one verdict item naming equivalence and the first divergent stage.
How it works
- 1.Run Manual Trigger; a Code node emits 9 valid fictional records across 3 branches (including an exact duplicate C-002) with internal fingerprints and subset expectations, plus 1 invalid record.
- 2.Validate Records routes incomplete records to Invalid Records Report, which counts them and feeds the final report; three branch-split IF nodes feed A, B and C into independent input indexes of every Merge.
- 3.The three topologies execute in append mode, with a checkpoint after each inner merge logging count, field union, sorted fingerprints and expectation match without altering passing items.
- 4.Three Code nodes fingerprint the final outputs (sorted plus append order) and a 6-input reporting Merge collects all reports.
- 5.Build Verdict Report emits one item: equivalence, first divergent stage, counts, field equality, duplicated ids, filtered invalid count, and order comparison as informational only.
Use cases
- Validating multi-branch merge refactors before migrating workflows between n8n versions.
- Diagnosing reports of dropped fields or rows when restructuring Append nodes.
- Documenting Merge append behavior as a saved local evidence artifact.
Requirements
- No credentials; fully local (manualTrigger, code, if, merge, stickyNote).
- For real data, replace the records array in Generate Sample Branches with records of the same schema (id, branch, payload fields).
- Run on the n8n version under evaluation and record the version number with the result manually.
Setup and testing in n8n
- Import the JSON into n8n (active=false) and press Execute Workflow.
- Confirm Generate Sample Branches outputs 10 items and Invalid Records Report shows count=1.
- Inspect both inner checkpoints: count=6 and ok=true each.
- Inspect Build Verdict Report: one item with equivalent=true, firstDivergence=none, duplicatedIds=["C-002"], invalidRecordsFiltered=1.
- Edge cases: empty a branch, delete one duplicate C-002 copy on a single path, or repeat an id with different content, and confirm the verdict flips with a divergence stage.
Service Value
Ready-made workflow template for automation delivery and service execution.
Apps Used
Details
How to Use
- 1.Click "Download Template"
- 2.Open your n8n dashboard
- 3.Go to Workflows > Import from File
- 4.Select downloaded file and configure credentials
Nodes Used (19)
Manual Trigger
Manual Trigger
Generate Sample Branches
Code
Validate Records
If
Invalid Records Report
Code
Branch A Split
If
Branch B Split
If
Branch C Split
If
Direct Merge (3 Inputs)
Merge
Left Inner Merge A+B
Merge
Left Final Merge (A+B)+C
Merge
Right Inner Merge B+C
Merge
Right Final Merge A+(B+C)
Merge
Left Inner Checkpoint
Code
Right Inner Checkpoint
Code
Fingerprint Direct Output
Code
Fingerprint Left Output
Code
Fingerprint Right Output
Code
Report Collector
Merge
Build Verdict Report
Code
Sticky: Overview
Sticky Note
Sticky: Validation
Sticky Note
Sticky: Topologies
Sticky Note
Sticky: Verdict
Sticky Note
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