Merge Drift Dual-Run Reverse Index Balance Auditor
Loading workflow…
Workflow Description
A manual-trigger audit workflow passes one fixed source through two parallel Code nodes that each build a category reverse index; path B simulates environment drift by dropping one record. A Merge node (append, two independent inputs) combines both runs, then a Code node balances every category counter against source counts and logically blocks sorting on any deficit via an If node routing to NoOp; only a fully balanced run reaches the Set counts report.
How it works
- 1.Run the manual trigger; a Code node emits the fictional source including one invalid record with no category
- 2.Paths A and B each build the reverse index (category to count); B drops record id=4 to simulate drift
- 3.Merge node in append mode collects both outputs from two independent inputs
- 4.A Code node balances each category count in A and B against the source and computes deltas
- 5.The If node checks full balance: deficit routes to the false output into NoOp blocking sorting; balance routes to the Set counts report
Use cases
- Proving merge result consistency between Desktop and Docker before adoption
- Detecting silently dropped rows between branches before sorting
- Auditing reverse indexes built from countable categories
Requirements
- n8n 2.45.4 with manualTrigger, code, set, if, merge, noOp and stickyNote nodes
- Each dual-run path wired to its own Merge input; never join both IF outputs to the same input
- No credentials; for real use replace the source array with a real input node of the same schema
Setup and testing in n8n
- Import the JSON into n8n and run Run Merge Drift Audit manually
- Normal/invalid case: the source includes a record without a category counted as __uncategorized
- Expect one item from Mismatch Branch with balanced=false and a one-record shipping deficit
- Remove the id!==4 filter in path B and rerun: flow reaches the Set report with auditStatus=index-balanced-ready-for-sort
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 (9)
Run Merge Drift Audit
Manual Trigger
Load Source Records
Code
Build Index Path A
Code
Build Index Path B (Drift Simulation)
Code
Combine Both Runs (Append)
Merge
Balance Counters vs Source
Code
Fully Balanced?
If
Counts Report (Ready to Sort)
Set
Mismatch Branch (Sort Blocked)
No Op
Stage 1: Source & Dual Runs
Sticky Note
Stage 2: Merge & Balance Gate
Sticky Note
Stage 3: Verdict & Output
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