Skip to content
Data & Databases

Classification Index Tally Reconciliation Across Merge Branches

10 nodes 95 4 Manual trigger
Download

Loading workflow…

Workflow Description

A self-contained workflow that explodes sub-arrays in one code branch (promoting each array key to a classification column), computes a per-value source tally in a second branch, appends both branches in a merge node with an independent input per branch, then builds an inverted index and reconciles each category's post-merge count against its source count. An IF node separates balanced from deviated categories, a NoOp marks the drift checkpoint, and a final code node emits one report with the index sorted descending by size.

How it works

  1. 1.Run the manual trigger to emit fictional records with two sub-arrays plus one invalid record
  2. 2.Branch A cross-product explodes arrays, promoting each key to a column, and drops one row to simulate silent loss
  3. 3.Branch B counts, per category value, how many source records contain it as the reference tally
  4. 4.An append merge collects both branches, each on its own input
  5. 5.A code node builds the inverted index and balances each value count against the reference
  6. 6.IF routes drift=0 items to the report and deviated items through the NoOp drift checkpoint
  7. 7.Report branches are joined and one final item is emitted: sorted index, reconciliation, drift report, overall status

Use cases

  • Auditing silent row loss when exploding arrays across multiple merged branches
  • Building a trustworthy sortable classification index before committing results
  • Screening invalid records before decomposition

Requirements

  • n8n 2.44.6 with code, merge, if, noOp, stickyNote and manualTrigger nodes
  • No credentials needed; fictional test payload is embedded
  • To use real data, replace the sample Code node with a real source using schema {record_id, <categoryKey>: string[]}

Setup and testing in n8n

  1. Import the JSON into n8n and execute 'Run Demo'
  2. Verify the final report shows channel/phone with drift -1 (R-003 row lost)
  3. Test the healthy path by removing the simulation line in Branch A so status becomes balanced
  4. Test edge cases with empty records or missing record_id; they appear in invalid_records

Service Value

Ready-made workflow template for automation delivery and service execution.

Apps Used

Manual Trigger Code Merge If No Op

Details

Trigger Manual trigger
Nodes 10
Apps 5
Views 95
Downloads 4

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

/

Run Demo

Manual Trigger

#1

Emit Sample Records

Code

#2

Explode Subarrays (Branch A)

Code

#3

Tally Source Counts (Branch B)

Code

#4

Append Branches

Merge

#5

Reconcile Index vs Source

Code

#6

Balanced?

If

#7

Drift Report Checkpoint

No Op

#8

Join Report Branches

Merge

#9

Final Sorted Index Report

Code

#10

Note: Setup

Sticky Note

#11

Note: Reconciliation Rule

Sticky Note

#12

Note: Outputs

Sticky Note

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