Reversible Nested Key Rename with Translation Manifest
Loading workflow…
Workflow Description
A self-contained manual-trigger workflow emits a fictional 3-level nested payload with objects and arrays, recursively renames every key found in a translation map at all depths while preserving values and structure, and produces a preserved-keys manifest plus a reverse map. The rename output branches: one path re-applies the reversed map and deep-compares against the original through an automatic IF, the other path feeds the manifest directly into Merge input 0, so the final single report contains both the manifest and the verification. No network calls or credentials involved.
How it works
- 1.Run the Manual Trigger; a Code node emits a fictional hierarchical sample payload
- 2.Edit the MAP constant in the rename node to match your source and target schemas
- 3.The rename node outputs the renamed structure, preserved-key manifest, and reverse map
- 4.The output branches: the manifest flows directly to Merge input 0, while the reverse chain verifies round-trip equality and reaches Merge input 1 via the IF
- 5.A mismatch routes to the NoOp failure endpoint
- 6.A final Code node aggregates both records into a single report item
Use cases
- Transforming nested JSON payloads between two schemas with a safe return path
- Documenting which keys were renamed versus preserved before touching target systems
- Automatically validating translation maps before deployment
Requirements
- n8n 2.44.6 with code, set, if, merge, noOp, stickyNote and manualTrigger nodes
- No credentials and no network calls — fully local processing
Setup and testing in n8n
- Import the JSON into n8n and execute from the Manual Trigger
- Verify roundTripVerified is true and preservedKeys includes phone_type, qty, customer
- Edit MAP so two keys map to the same target to exercise the failure branch via NoOp
- Replace the sample node with a real trigger emitting {json:{payload:...}} of the same schema
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 (8)
Run Demo Manually
Manual Trigger
Emit Sample Payload
Code
Recursive Rename and Manifest
Code
Reverse Apply and Verify
Code
Round-trip Matches?
If
Combine Report Branches
Merge
Build Single Report
Code
Failure Endpoint
No Op
Usage Docs
Sticky Note
Failure Branch Docs
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