Skip to content
AI Agents

Reversible Nested Key Rename with Translation Manifest

8 nodes 78 5 Manual trigger
Download

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. 1.Run the Manual Trigger; a Code node emits a fictional hierarchical sample payload
  2. 2.Edit the MAP constant in the rename node to match your source and target schemas
  3. 3.The rename node outputs the renamed structure, preserved-key manifest, and reverse map
  4. 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. 5.A mismatch routes to the NoOp failure endpoint
  6. 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

  1. Import the JSON into n8n and execute from the Manual Trigger
  2. Verify roundTripVerified is true and preservedKeys includes phone_type, qty, customer
  3. Edit MAP so two keys map to the same target to exercise the failure branch via NoOp
  4. 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

Manual Trigger Code If Merge No Op

Details

Trigger Manual trigger
Nodes 8
Apps 5
Views 78
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 (8)

Run Demo Manually

Manual Trigger

#1

Emit Sample Payload

Code

#2

Recursive Rename and Manifest

Code

#3

Reverse Apply and Verify

Code

#4

Round-trip Matches?

If

#5

Combine Report Branches

Merge

#6

Build Single Report

Code

#7

Failure Endpoint

No Op

#8

Usage Docs

Sticky Note

#9

Failure Branch Docs

Sticky Note

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