Merge Rewritten Field Back Into Originals With Drift Detection
Read the execution path horizontally, with supporting AI nodes below. Layout changes affect this preview only; the download stays unchanged.
Loading workflow…
Workflow Description
Takes originals and rewritten arrays and matches them by an id field using a Map. Copies only the target field into each original, then compares other fields present in the rewrite with the original and flags differences as drift. Flags originals without a rewrite, rewrites without an original, and missing or duplicate ids. An IF node separates clean records from issues, and one final report lists counts, merged records including drifted ones, and a reason per case. Empty batches yield a zero-count report.
How it works
- 1.Emit Sample Batch outputs a fictional batch
- 2.Configure Field Names sets id_field and target_field
- 3.Match And Merge Target Field matches by id, copies the target field, detects drift and always emits a batch_info item
- 4.Has Issue? routes items by has_issue
- 5.Combine Routes appends both branches
- 6.Build Final Report returns one report with counts, clean_records, merged_records and issues
Use cases
- Restoring AI-rewritten product descriptions into full records
- Auditing rewrite outputs for unrequested changes
Requirements
- One JSON item with originals and rewritten arrays
- Id field and target field names set in the Set node
- No credentials needed
Setup and testing in n8n
- Import the workflow and run it manually
- Check A1 is clean, A2 is drift on price with its merged record, A3 and X9 are unmatched, and the id-less rewrite is invalid
- Empty both arrays and confirm a zero-count report
- Duplicate an id or remove the target field from a rewrite and confirm it is invalid
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
Emit Sample Batch
Code
Configure Field Names
Set
Match And Merge Target Field
Code
Has Issue?
If
Tag Issue Route
Set
Tag Clean Route
Set
Combine Routes
Merge
Build Final Report
Code
Note Setup
Sticky Note
Note Logic
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