Filter Previously Processed Items with a Supplied ID Ledger and Output the Updated Ledger
Loading workflow…
Get this workflow
- Workflow price
- 1.00 USD
- PayPal surcharge · 7.5%
- 0.08 USD
- Total
- 1.08 USD
One-time payment. Download and copy become available after payment is confirmed.
Diagram preview only; executable configuration is available after purchase.
Workflow Description
The workflow reads an items batch and a processed_ids ledger from input, normalizes IDs by trimming and lowercasing, and classifies each item as new, seen_before, duplicate_in_batch, or invalid_id. An IF node separates new from excluded items, a Merge combines both routes, and a Code node builds one report with counts per reason, new and excluded lists, and an updated ledger trimmed to the last N IDs. Nothing is persisted; you store the ledger yourself.
How it works
- 1.Manual Trigger starts the run
- 2.Code node emits a fictional batch and ledger
- 3.Set node defines id_field and max_ledger_size
- 4.Classify node normalizes IDs and tags each item
- 5.IF routes new items to accepted, others to excluded
- 6.Merge appends both routes
- 7.Code node builds one report and the trimmed processed_ids
Use cases
- Prevent duplicate messages across repeated runs
- Clean overlapping order batches before processing
- Inspect and bound the dedup history size
Requirements
- JSON input containing items and processed_ids
- Set id_field and max_ledger_size in Dedup Settings
- Persist the output ledger between runs outside this workflow
Setup and testing in n8n
- Import the JSON into n8n
- Run manually and verify new_count=3 and excluded_count=3
- Check processed_ids holds only 5 IDs
- Set items to an empty array and confirm zero counts with the old ledger
- Change max_ledger_size to 2 and verify trimming
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 (9)
Manual Trigger
Manual Trigger
Sample Batch and Ledger
Code
Dedup Settings
Set
Classify Items
Code
Is New Item?
If
Tag Accepted
Set
Tag Excluded
Set
Combine Routes
Merge
Build Report and Ledger
Code
Note Input
Sticky Note
Note Classify
Sticky Note
Note Output
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