Skip to content
AI Agents

Pre/Post-Merge Key Manifest Reconciliation with Empty-Branch Sentinel

11 nodes 7 0 Manual trigger
Download

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. 1.Manual Trigger runs a code node emitting fictional items with unique id and optional branch
  2. 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. 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. 4.A Merge in append mode combines both outputs; the sentinel guarantees non-empty inputs so execution never stalls
  5. 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. 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

  1. 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
  2. Remove drop:true from B-202 and run: expect ok=true on the reconciliation_passed path
  3. 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)
  4. 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

Manual Trigger Code Merge If Set No Op

Details

Trigger Manual trigger
Nodes 11
Apps 6
Views 7
Downloads 0

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

/

Stage Guide

Sticky Note

#1

Sentinel Note

Sticky Note

#2

Routing Note

Sticky Note

#3

Manual Trigger

Manual Trigger

#4

Generate Sample Branch Data

Code

#5

Build Manifest Branch A (with Sentinel)

Code

#6

Build Manifest Branch B (with Sentinel)

Code

#7

Merge Branches (Append)

Merge

#8

Reconcile Manifest vs Merged Output

Code

#9

Reconciliation Passed?

If

#10

Tag Passed Report

Set

#11

Tag Loss Report

Set

#12

Complete Flow End

No Op

#13

Report Missing Keys

No Op

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