Skip to content
Data & Databases

Merge Arrival Audit: Branch Output vs Certificates and Arrival Blocks

11 nodes 93 8 Manual trigger
Download

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. 1.Manual Trigger starts the template with one empty item
  2. 2.A Code node builds normalized sample records, computes isHigh and records data issues, ignoring inputs without the schema
  3. 3.A Set node (includeOtherFields:true) adds branchTag='unassigned' without dropping fields
  4. 4.An If node splits items into the high branch (true) and low branch (false)
  5. 5.Each branch Code node rewrites branchTag and appends {type:'cert',branch,count}
  6. 6.Merge append: high branch to input 1, low branch to input 2
  7. 7.A final Code node reads both branch node outputs, reconciles arrivals and returns exactly one report
  8. 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

  1. Import the JSON and open the workflow
  2. Run Execute Workflow and confirm Arrivals Verified is reached with status=PASS and totalMergedItems=8
  3. Open the final report: upstreamRecordCount must equal certifiedCount and mergedRecordCount per branch
  4. 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
  5. Edge test: make all amounts <=100 so the high branch never executes; the report stays valid with expectedBranches=['low']
  6. 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

Manual Trigger Code Set If Merge No Op

Details

Trigger Manual trigger
Nodes 11
Apps 6
Views 93
Downloads 8

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

Emit Sample Records

Code

#2

Tag Initial Branch

Set

#3

Split High vs Low

If

#4

Stamp High Branch

Code

#5

Stamp Low Branch

Code

#6

Merge Branches (append)

Merge

#7

Audit Merge Arrivals

Code

#8

Audit Passed?

If

#9

Arrivals Verified

No Op

#10

Arrival Defect Detected

No Op

#11

Note Stage 1

Sticky Note

#12

Note Stage 2

Sticky Note

#13

Note Merge Wiring Rule

Sticky Note

#14

Note Audit Report

Sticky Note

#15
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