Skip to content
Data & Databases

Dotted Key Policy Impact Simulator: Preserve vs Expand vs Encode

9 nodes 56 4 Manual trigger
Download

Loading workflow…

Workflow Description

A self-contained workflow that simulates three dotted-key policies per record without touching the source payload: literal preserve, dot-path expansion, and reversible percent escaping. It counts collisions and changed values per policy, rejects records containing sensitive segments such as __proto__ via an If node while naming the path, applies a deterministic zero-loss-then-fewest-changes recommendation, merges both branches on separate inputs, and emits exactly one aggregated decision report including an encode/decode round-trip test per record.

How it works

  1. 1.Manual trigger fires; a Code node emits three fictional records (normal, a.b collision, sensitive segment)
  2. 2.Scan keys at all depths, count dotted keys, detect banned segments, build the decode map
  3. 3.Simulate preserve, expand and encode in isolated models, logging every collision before replacement
  4. 4.Decode the encoded model and compare it literally to the original snapshot
  5. 5.If routes sensitive records to rejection plus a NoOp audit checkpoint, safe records to approval
  6. 6.Merge joins both branches on independent inputs; the final Code node returns one decision report

Use cases

  • Legacy metrics or settings pipelines with dotted fields before transformation
  • Detecting literal a.b vs nested a.b collisions before migration
  • Documenting a reversible key policy decision before production changes

Requirements

  • No credentials - fully local execution
  • For real data: feed the first Code node items with recordId and record of the same schema
  • Declared escaping convention: % to %25 and dot to %2E

Setup and testing in n8n

  1. Import the JSON into n8n and click Execute Workflow
  2. Verify the single final item: 3 records, 2 approved, 1 rejected
  3. Check R2: one expansion collision, one changed value, preserve recommended
  4. Edge test: add a key containing %25 or an item without a record field

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

/

Sticky: Overview and Setup

Sticky Note

#1

Run Policy Simulator

Manual Trigger

#2

Sticky: Sample Data Stage

Sticky Note

#3

Emit Fictional Records

Code

#4

Simulate Preserve Expand Encode

Code

#5

Sensitive Segments Present?

If

#6

Mark Record Rejected

Set

#7

Approve With Recommendation

Set

#8

Rejected Audit Checkpoint

No Op

#9

Sticky: Routing and Report

Sticky Note

#10

Join Decision Branches

Merge

#11

Build Final Decision Report

Code

#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