Empty Placeholder Filter Before Append Merge With Quarantine Report
Loading workflow…
Workflow Description
A fully local n8n template that simulates two JSON branches deliberately containing fully empty items ({}) and items whose values are all empty. One Code node per branch classifies every item as healthy, fully_empty or empty_values, forwards healthy items tagged with branch and source index, and collects removals in a single quarantine log item. An IF node routes the log through NoOp, an append Merge with four inputs joins clean items and logs, and a final Code node emits exactly one report item with per-branch counts, balance verification, classification totals, the full quarantine log and a plain-language diagnosis of the silent empty output.
How it works
- 1.Manual Trigger starts both branches.
- 2.Two Code nodes emit fictional branch data including empty placeholder items.
- 3.A Code node per branch classifies items, drops empty ones and builds a quarantine log.
- 4.An IF node checks is_quarantine_log, sending logs to NoOp and clean items to Merge.
- 5.Merge in append mode with four inputs: clean A, log A, clean B, log B.
- 6.A final Code node (runOnceForAllItems) returns one balance report item.
Use cases
- Diagnose an empty or polluted merge output despite a successful execution
- Strip Always Output Data placeholder items before appending
- Document why items disappeared during workflow reviews
- Verify input and output counts match per branch
Requirements
- n8n 2.47.x with manualTrigger, code, if, merge, noOp, stickyNote nodes
- No credentials and no external calls needed
- Replace the two sample generators with your real branches of the same flat schema
Setup and testing in n8n
- Import the JSON and click Execute Workflow.
- Inspect Build Balance Report: one item with total_input=7, total_merged_clean=3, total_quarantined=4, balance_ok=true.
- Edge case: make every item of one branch {}; healthy_count becomes 0 and balance_ok stays true.
- Edge case: return an empty samples array to get the 'no items reached the filter' diagnosis.
- Swap sample data for your own without touching the classification logic.
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)
Manual Trigger
Manual Trigger
Branch A Source Items
Code
Branch B Source Items
Code
Classify Branch A
Code
Classify Branch B
Code
Is Quarantine Log A
If
Is Quarantine Log B
If
Collect Quarantine A
No Op
Collect Quarantine B
No Op
Append Clean And Logs
Merge
Build Balance Report
Code
Note Sources
Sticky Note
Note Classify
Sticky Note
Note Report
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