Skip to content
Data & Databases

JSON Payload Prep Gate: Dotted-Key Neutralization and Unicode Escaping with Reversible Changelog

8 nodes 77 7 Manual trigger
Download

Loading workflow…

Workflow Description

A fully local workflow that prepares payloads before a Set node in JSON mode. A Code node walks the structure recursively, renames every key containing a dot or brackets into a safe form while recording a restore map, escapes unsafe characters in string values into \uXXXX sequences, then runs the inverse transform and deep-compares it with the original. A Set node flags readiness while keeping all fields, an If node separates sanitized from already-clean items, Merge rejoins both branches, and a final Code node emits one changelog report with per-item rename and escape counters plus warnings.

How it works

  1. 1.Manual Trigger starts the run
  2. 2.Load Sample Payloads emits four fictional items: dotted key with emoji, clean record, nested dotted keys with accented/emoji text, and an empty object
  3. 3.Sanitize node renames unsafe keys, builds restoreMap and escapes characters to \uXXXX
  4. 4.The same node un-escapes, re-applies original keys and deep-compares to set reversibleMatch
  5. 5.Set node adds readyForSetJson and sanitizerVersion with includeOtherFields:true
  6. 6.If node routes sanitized items to output 1 and clean items to output 2
  7. 7.Merge (append, 2 inputs) rejoins both branches, NoOp acts as checkpoint
  8. 8.Final Code node (runOnceForAllItems) returns one changelog report

Use cases

  • Preparing emoji-bearing user text for dynamic JSON templates in n8n
  • Preventing silent value loss when a JSON key contains a dot in Set JSON mode
  • Auditing encoding reversibility before handing a payload downstream
  • Producing a data-quality changelog

Requirements

  • n8n 2.48.4 or newer
  • No credentials required: all processing is local
  • Replace the sample node with your real source using the same shape (one JSON object per item)

Setup and testing in n8n

  1. Import the JSON and open the workflow
  2. Click Execute Workflow and inspect the Sanitize output: item 0 must contain order__DOT__customer__DOT__name with value Lina \u26D4
  3. Confirm reversibleMatch is true for every item
  4. Check the final report: totalItems=4, sanitizedItemCount=2, cleanItemCount=2
  5. Edge case: the empty object appears on the clean branch with zero counters and a warning
  6. Change a sample key to data[0].id and verify renaming and restoration

Service Value

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

Apps Used

Manual Trigger Code Set If Merge No Op

Details

Trigger Manual trigger
Nodes 8
Apps 6
Views 77
Downloads 7

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)

/

Manual Trigger

Manual Trigger

#1

Load Sample Payloads

Code

#2

Sanitize Keys And Unicode

Code

#3

Mark Ready For Set JSON

Set

#4

Was Sanitized?

If

#5

Merge Branches

Merge

#6

Audit Checkpoint

No Op

#7

Build Changelog Report

Code

#8

Sticky Stage Overview

Sticky Note

#9

Sticky Encoding Rules

Sticky Note

#10

Sticky Output Notes

Sticky Note

#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