Skip to content
AI Agents

Nested Object Editor with Preserved Key Manifest and Change Detection

10 nodes 80 4 Manual trigger
Download

Loading workflow…

Workflow Description

A self-contained manual-trigger workflow that extracts a sorted key manifest of a nested object map before editing, flattens each key/value pair into explicit items with safe string values to prevent [object,Object], edits values via a Set node with includeOtherFields enabled so keys and manifests survive, rebuilds the manifest afterward, and compares both literally in an If node. Matching items flow to Merge input 0; mismatches pass through a NoOp into Merge input 1, and a final Code node emits one consolidated report.

How it works

  1. 1.Run the manual trigger; a Code node emits fictional nested-map data with the production schema
  2. 2.A Code node builds the sorted key manifest before editing into keyManifestBefore
  3. 3.A Code node flattens the map via Object.entries into items with key, stringified value and sourceMap
  4. 4.A Set node uppercases value with includeOtherFields:true to keep key and manifests
  5. 5.A Code node recomputes the manifest into keyManifestAfter
  6. 6.An If node compares manifests literally: true to Merge input 0, false via NoOp to Merge input 1
  7. 7.Merge appends both paths, then a final Code node returns one consolidated report item

Use cases

  • Editing values of hierarchical object maps while documenting all original keys
  • Detecting deleted or renamed fields during JSON processing in n8n
  • Converting nested maps into explicit inspectable items without [object,Object]
  • Schema integrity auditing before handing data to downstream stages

Requirements

  • n8n 2.44.4 with built-in nodes only: manualTrigger, code, set, if, merge, noOp, stickyNote
  • No credentials or external connections; sample data is fictional test data
  • For production, replace the sample Code node with a real source using the same nestedMap schema

Setup and testing in n8n

  1. Import the JSON into n8n and run Execute Workflow; expect one report with manifestMatch=true and four records
  2. Inspect records: no [object,Object], every original key is an independent key field, value uppercased
  3. For mismatch, delete the customer_delta item from sample data or flatten output and rerun; If routes through NoOp into Merge and manifestMatch=false without stopping
  4. For empty input set nestedMap to {}; output is one empty item with two equal empty manifests and no error

Service Value

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

Apps Used

Manual Trigger Code Set If No Op Merge

Details

Trigger Manual trigger
Nodes 10
Apps 6
Views 80
Downloads 4

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

/

Manual Trigger

Manual Trigger

#1

Sample Nested Map (Fictional)

Code

#2

Build Key Manifest (Before)

Code

#3

Flatten Map to Key/Value Items

Code

#4

Edit Value (Keep Key)

Set

#5

Build Key Manifest (After)

Code

#6

Manifests Match?

If

#7

Isolate Manifest Mismatch

No Op

#8

Merge Both Paths

Merge

#9

Final Report

Code

#10

Sticky: Input and Output Shapes

Sticky Note

#11

Sticky: Testing Mismatch Path

Sticky Note

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