Portable Merge-Append Inventory Balance: Branch Tags, Index Reconciliation and Breach Routing
Loading workflow…
Workflow Description
A self-contained template that proves Merge append integrity. A Code node generates demo rows for two branches, per-branch Code nodes isolate them and carry their own expected count, and a Set node stamps each item with branch_tag (branch name plus local index) before merging. Merge append with two independent inputs joins the branches, then one reconciliation Code node verifies per-branch counts and total, duplicate and missing indices, tag/index consistency, and field completeness against each branch schema. An If node routes to a pass report or a documented NoOp breach path, and a final Code node emits a single verdict item listing broken constraints.
How it works
- 1.Manual Trigger emits one empty item into the sample generator
- 2.Generate Sample Branch Rows creates 6 rows: 3 alpha, 3 beta, one beta row missing the region field
- 3.Isolate Code nodes split each branch and attach branch_expected_count computed from the branch itself
- 4.Set nodes (includeOtherFields: true) add branch_tag = branch name plus local index
- 5.Merge append with two independent inputs joins the branches, never two branches on one input
- 6.Reconcile Append Inventory computes counts, duplicate and missing indices, tag checks and missing fields into a breaches list
- 7.If on reconciliation_passed routes to the PASS Set or the NoOp breach path
- 8.A second append Merge rejoins both paths and a final Code node emits exactly one verdict item
Use cases
- Verify a multi-query append merge lost no rows
- Detect dropped fields from non-first branches after append
- Prove no duplicated or missing index before trusting an aggregated report
- Gate a merged list before passing it downstream
Requirements
- n8n 2.47.x
- Only manualTrigger, code, set, if, merge, noOp, stickyNote nodes
- No credentials and no external calls
- Replace the generator node with your real sources using the same schema
Setup and testing in n8n
- Import the JSON and open the canvas
- Click Execute Workflow and inspect Emit Reconciliation Verdict: verdict = FAIL with one breach for the missing region field
- Add region to row B-2002 in the generator and re-run to get verdict = PASS
- Duplicate case: repeat local_index 2 in alpha to see duplicate_indices and its breach
- Empty case: return an empty rows array to see the no-items path
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 (13)
Manual Trigger
Manual Trigger
Generate Sample Branch Rows
Code
Isolate Alpha Branch
Code
Isolate Beta Branch
Code
Tag Alpha Items
Set
Tag Beta Items
Set
Merge Append Branches
Merge
Reconcile Append Inventory
Code
If Inventory Balanced
If
Mark Pass Report
Set
Documented Breach Path
No Op
Collect Outcome
Merge
Emit Reconciliation Verdict
Code
Stage Notes
Sticky Note
Merge Notes
Sticky Note
Balance Notes
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