Pre/Post-Merge Key Manifest Reconciliation with Empty-Branch Sentinel
Read the execution path horizontally, with supporting AI nodes below. Layout changes affect this preview only; the download stays unchanged.
Loading workflow…
Workflow Description
Self-contained workflow with no external calls: a code node emits fictional two-branch data including one corrupt item and one simulated-loss item, fanning out to two parallel manifest nodes that filter branches internally, validate id types, and always emit a manifest_only sentinel when a branch is empty so an append Merge never stalls; a reconciliation code node emits one report with pre/post counts, empty branch names, corrupt-item counts and exact missing keys, and an IF routes through Set nodes adding distinct report fields per path before final noOp nodes.
How it works
- 1.Manual Trigger runs a code node emitting fictional items with unique id and optional branch
- 2.The sample fans out to two parallel manifest nodes; each filters its branch (explicit A, everything else under B) and separates corrupt items (non-string or empty id) into invalid_count
- 3.Each node attaches branch_manifest to the first passing item only, and emits a manifest_only sentinel item if the branch has no valid items
- 4.A Merge in append mode combines both outputs; the sentinel guarantees non-empty inputs so execution never stalls
- 5.A runOnceForAllItems code node emits one report: pre/post counts, empty_branch (received_count=0), all_items_invalid, invalid_count and missing keys
- 6.An IF on ok routes through Set nodes adding outcome=reconciliation_passed or outcome=keys_lost_alert with missing_keys_detail, then a noOp per path
Use cases
- Verifying completeness of conditional path merges in n8n without stalling on empty branches
- Detecting silent item loss between branching and merging
- Distinguishing empty branches from branches whose items are all corrupt in reconciliation reports
Requirements
- n8n 2.44.4 or newer with executionOrder=v1
- No credentials and no external calls
- For production: replace the sample node with real input; each item needs a unique string id, an optional branch of A or B (missing branch counts under B); never use drop outside testing
Setup and testing in n8n
- Import the JSON and run Manual Trigger: expect the keys_lost_alert path detecting B-202 with missing_keys_detail='B: B-202' and branch B invalid_count=1
- Remove drop:true from B-202 and run: expect ok=true on the reconciliation_passed path
- Delete all branch A items in the sample node and run: expect completion with empty_branches=['A'] and ok=true via the reconciliation_passed path (sentinel prevents stalling)
- Make all branch A items have invalid ids and run: expect empty_branch=false with all_items_invalid=true and invalid_count=3
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 (11)
Stage Guide
Sticky Note
Sentinel Note
Sticky Note
Routing Note
Sticky Note
Manual Trigger
Manual Trigger
Generate Sample Branch Data
Code
Build Manifest Branch A (with Sentinel)
Code
Build Manifest Branch B (with Sentinel)
Code
Merge Branches (Append)
Merge
Reconcile Manifest vs Merged Output
Code
Reconciliation Passed?
If
Tag Passed Report
Set
Tag Loss Report
Set
Complete Flow End
No Op
Report Missing Keys
No Op
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