Merge Arrival Audit: Branch Output vs Certificates and Arrival Blocks
Loading workflow…
Workflow Description
A fully local n8n template auditing an If-then-Merge topology. A Code node emits six fictional records (one invalid amount, one missing id) and only consumes incoming items that truly carry the target schema; a Set node tags branchTag='unassigned' while keeping all fields. An If node splits them, each branch Code node rewrites branchTag and appends a certificate with branch name and count. Merge in append mode takes each branch on its own input. The final Code node reads what each branch node actually produced, reconciles it against what arrived after Merge, analyses arrival blocks and flags missing branches, duplicated blocks, unknown tags and duplicate ids in one PASS/FAIL report.
How it works
- 1.Manual Trigger starts the template with one empty item
- 2.A Code node builds normalized sample records, computes isHigh and records data issues, ignoring inputs without the schema
- 3.A Set node (includeOtherFields:true) adds branchTag='unassigned' without dropping fields
- 4.An If node splits items into the high branch (true) and low branch (false)
- 5.Each branch Code node rewrites branchTag and appends {type:'cert',branch,count}
- 6.Merge append: high branch to input 1, low branch to input 2
- 7.A final Code node reads both branch node outputs, reconciles arrivals and returns exactly one report
- 8.An If node routes PASS to a verified NoOp and FAIL to a defect NoOp; sticky notes document each stage
Use cases
- Pre-deployment audit that all branch items actually reach the Merge node
- Diagnosing No Merge Data Found or missing/duplicated merged items
- Proving branch attribution of every merged item in quality reviews
- Spotting duplicate or incomplete records before trusting the output
Requirements
- n8n 2.47.x with manualTrigger, Code, Set, If, Merge (append), NoOp and StickyNote nodes
- No credentials and no network calls
- For real data replace the fallback array or feed items of schema {recordId, customer, amount}
- Keep one dedicated Merge input per branch and keep the branch node names, since the report reads them
Setup and testing in n8n
- Import the JSON and open the workflow
- Run Execute Workflow and confirm Arrivals Verified is reached with status=PASS and totalMergedItems=8
- Open the final report: upstreamRecordCount must equal certifiedCount and mergedRecordCount per branch
- Defect test: move the low branch from Merge input 2 to input 1 and re-run; status becomes FAIL with duplicated blocks or a missing branch
- Edge test: make all amounts <=100 so the high branch never executes; the report stays valid with expectedBranches=['low']
- Quality test: add a record with a duplicate id and check duplicateRecordIds occurrences
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 (11)
Manual Trigger
Manual Trigger
Emit Sample Records
Code
Tag Initial Branch
Set
Split High vs Low
If
Stamp High Branch
Code
Stamp Low Branch
Code
Merge Branches (append)
Merge
Audit Merge Arrivals
Code
Audit Passed?
If
Arrivals Verified
No Op
Arrival Defect Detected
No Op
Note Stage 1
Sticky Note
Note Stage 2
Sticky Note
Note Merge Wiring Rule
Sticky Note
Note Audit Report
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