Skip to content
Data & Databases

Portable Merge-Append Inventory Balance: Branch Tags, Index Reconciliation and Breach Routing

13 nodes 85 7 Manual trigger
Download

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. 1.Manual Trigger emits one empty item into the sample generator
  2. 2.Generate Sample Branch Rows creates 6 rows: 3 alpha, 3 beta, one beta row missing the region field
  3. 3.Isolate Code nodes split each branch and attach branch_expected_count computed from the branch itself
  4. 4.Set nodes (includeOtherFields: true) add branch_tag = branch name plus local index
  5. 5.Merge append with two independent inputs joins the branches, never two branches on one input
  6. 6.Reconcile Append Inventory computes counts, duplicate and missing indices, tag checks and missing fields into a breaches list
  7. 7.If on reconciliation_passed routes to the PASS Set or the NoOp breach path
  8. 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

  1. Import the JSON and open the canvas
  2. Click Execute Workflow and inspect Emit Reconciliation Verdict: verdict = FAIL with one breach for the missing region field
  3. Add region to row B-2002 in the generator and re-run to get verdict = PASS
  4. Duplicate case: repeat local_index 2 in alpha to see duplicate_indices and its breach
  5. 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

Manual Trigger Code Set Merge If No Op

Details

Trigger Manual trigger
Nodes 13
Apps 6
Views 85
Downloads 7

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 (13)

/

Manual Trigger

Manual Trigger

#1

Generate Sample Branch Rows

Code

#2

Isolate Alpha Branch

Code

#3

Isolate Beta Branch

Code

#4

Tag Alpha Items

Set

#5

Tag Beta Items

Set

#6

Merge Append Branches

Merge

#7

Reconcile Append Inventory

Code

#8

If Inventory Balanced

If

#9

Mark Pass Report

Set

#10

Documented Breach Path

No Op

#11

Collect Outcome

Merge

#12

Emit Reconciliation Verdict

Code

#13

Stage Notes

Sticky Note

#14

Merge Notes

Sticky Note

#15

Balance Notes

Sticky Note

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