Skip to content
Data & Databases

Scheduled Chained Key Rename with Reverse Verification

9 nodes 68 5 Manual trigger
Download

Loading workflow…

Workflow Description

A self-contained workflow that reads a from/to rename map and a nested JSON payload, builds a dependency graph, computes a safe Kahn topological execution order, detects cycles and destination conflicts, transforms objects and arrays recursively, then applies the inverse map and compares the restored structure with the original field-by-field, passing matched output, quarantining lost-field cases into a labeled branch, and emitting one aggregated run report.

How it works

  1. 1.Run 'Run Demo' to load two fictional samples: a chained map on a depth-three object with arrays, and an ambiguous map a→b with c→b
  2. 2.'Schedule & Transform' builds the dependency graph, computes the safe Kahn order, detects cycles/conflicts, then applies the rename recursively
  3. 3.'Reverse Verify' applies the inverse map in reverse order, flattens original and restored structures, compares every field path and computes the match rate
  4. 4.'Verification Passed?' routes matched output to a Set tagging verified_output and failed output to a quarantine NoOp
  5. 5.'Join Branches' merges both branches and 'Build Run Summary' emits one report with counts, match rates and missing fields

Use cases

  • Safely migrating nested JSON payloads between naming schemas
  • Preventing silent overwrites in chained maps like A→B with B→C
  • Auditing rename maps before trusting them in production n8n pipelines

Requirements

  • Test data matching the schema {map:[{from,to}], payload:{...}} to replace the samples in 'Load Fictional Samples'
  • No credentials needed: all nodes are local (code/set/if/noOp/merge/stickyNote)
  • n8n version 2.44.7 or newer

Setup and testing in n8n

  1. Import the workflow JSON and open it in n8n
  2. Click Execute workflow; expect one report item: total_items=2, verified_count=1, failed_count=1
  3. Verify item 1 has schedule=['cust_ref -> acct_id','user_id -> cust_ref'] and match_rate=1
  4. Verify item 2 has missing_fields=['a'] with a destination conflict on b from two sources
  5. For real data, replace the returned array in 'Load Fictional Samples' with your items or feed them into the same node

Service Value

Ready-made workflow template for automation delivery and service execution.

Apps Used

Manual Trigger Code If Set No Op Merge

Details

Trigger Manual trigger
Nodes 9
Apps 6
Views 68
Downloads 5

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

/

Setup Sticky

Sticky Note

#1

Output Sticky

Sticky Note

#2

Run Demo

Manual Trigger

#3

Load Fictional Samples

Code

#4

Schedule & Transform

Code

#5

Reverse Verify

Code

#6

Verification Passed?

If

#7

Tag Verified Output

Set

#8

Quarantine Missing Fields

No Op

#9

Join Branches

Merge

#10

Build Run Summary

Code

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