Skip to content
Data & Databases

Merge Drift Dual-Run Reverse Index Balance Auditor

9 nodes 71 7 Manual trigger
Download

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. 1.Run the manual trigger; a Code node emits the fictional source including one invalid record with no category
  2. 2.Paths A and B each build the reverse index (category to count); B drops record id=4 to simulate drift
  3. 3.Merge node in append mode collects both outputs from two independent inputs
  4. 4.A Code node balances each category count in A and B against the source and computes deltas
  5. 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

  1. Import the JSON into n8n and run Run Merge Drift Audit manually
  2. Normal/invalid case: the source includes a record without a category counted as __uncategorized
  3. Expect one item from Mismatch Branch with balanced=false and a one-record shipping deficit
  4. 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

Manual Trigger Code Merge If Set No Op

Details

Trigger Manual trigger
Nodes 9
Apps 6
Views 71
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 (9)

/

Run Merge Drift Audit

Manual Trigger

#1

Load Source Records

Code

#2

Build Index Path A

Code

#3

Build Index Path B (Drift Simulation)

Code

#4

Combine Both Runs (Append)

Merge

#5

Balance Counters vs Source

Code

#6

Fully Balanced?

If

#7

Counts Report (Ready to Sort)

Set

#8

Mismatch Branch (Sort Blocked)

No Op

#9

Stage 1: Source & Dual Runs

Sticky Note

#10

Stage 2: Merge & Balance Gate

Sticky Note

#11

Stage 3: Verdict & Output

Sticky Note

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