Skip to content
Data & Databases

Stringified JSON Field Normalizer with Per-Record Status Card

8 nodes 7 0 Manual trigger
Download

Loading workflow…

Workflow Description

A self-contained manual workflow that emits mixed-type demo records, then recursively scans every field and attempts JSON.parse inside try/catch for each string whose trimmed value starts with a brace or bracket. Valid strings become real objects or arrays; broken or truncated ones stay strings tagged corrupt without halting execution. An IF node splits clean records from records containing corrupt fields into two NoOp branches, Merge in append mode recombines them with no record loss, and a final Code node restores the original order and emits one status card per record counting fields by status and listing parsed and corrupt field paths next to the normalized payload.

How it works

  1. 1.Manual Trigger starts the run.
  2. 2.Mixed Sample Payload emits three fictional records: a real object, valid JSON strings and one truncated JSON string.
  3. 3.Normalize JSON Fields walks fields recursively up to depth 8 and tags each as was_object, parsed_from_string, remained_string or corrupt.
  4. 4.Detection is prefix-based, so truncated JSON is attempted and reported corrupt instead of passing as plain text.
  5. 5.IF checks _normalization.has_corrupt and routes clean records to true, corrupt ones to false, each via a NoOp.
  6. 6.Merge append with two separate inputs, then Build Status Cards emits one status card per record.

Use cases

  • Normalizing payloads where the same field arrives sometimes as object, sometimes as a JSON string.
  • Detecting unparsable or truncated string fields before downstream nodes break.
  • Producing a diagnostic report of which field paths were parsed from strings.
  • Cleaning database rows that store JSON inside text columns.

Requirements

  • n8n version matching the listed node typeVersions (2.47.x).
  • No credentials required; the workflow is fully local.
  • For production data, replace the sample Code node with your own source emitting the same item shape.

Setup and testing in n8n

  1. Import the JSON and click Execute Workflow.
  2. Verify REC-001 and REC-003 return status normalized and REC-002 returns has_corrupt_fields with corrupt_fields=["meta"].
  3. Verify REC-001 meta is now an object and meta.source is reachable.
  4. Edge case: make the sample node return an empty array; the run finishes without errors.
  5. Edge case: add a string field like '[1,2' and confirm it is tagged corrupt without stopping execution.

Service Value

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

Apps Used

Manual Trigger Code If No Op Merge

Details

Trigger Manual trigger
Nodes 8
Apps 5
Views 7
Downloads 0

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

Mixed Sample Payload

Code

#2

Normalize JSON Fields

Code

#3

Has Corrupt Fields?

If

#4

Fully Normalized Branch

No Op

#5

Corrupt Fields Branch

No Op

#6

Merge Branches

Merge

#7

Build Status Cards

Code

#8

Stage Notes

Sticky Note

#9

Normalization Map

Sticky Note

#10

Routing And Report

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