JSON Text Health Diagnoser with Parse-Error Quarantine
Loading workflow…
Workflow Description
The workflow parses each JSON text independently inside try/catch, so one broken record never stops the rest. Valid records keep the parsed value and root type; failures are quarantined with ID, index, error category, a sanitized message and a bounded preview. Non-string input is rejected without coercion. An IF splits branches, Set nodes add status, Merge appends them, and a final Code node builds one report with counts. It does not repair content or validate schemas.
How it works
- 1.A Code node emits seven fictional {id, raw} records.
- 2.The parse node checks raw type, then runs JSON.parse in try/catch per record.
- 3.IF routes on parse_ok.
- 4.Two Set nodes add status valid or quarantined, keeping other fields.
- 5.Merge appends both branches; a final Code node builds one report sorted by index.
Use cases
- Checking LLM-generated JSON before downstream use.
- Quarantining hand-copied payloads with unescaped quotes.
Requirements
- No credentials needed.
- Adjust RAW_FIELD, ID_FIELD, PREVIEW_MAX and ALLOWED_ROOT_TYPES in the parse node.
Setup and testing in n8n
- Import the JSON into n8n.
- Click Execute Workflow.
- Confirm 3 valid and 4 quarantined records in the report.
- Add a record without id or raw and confirm missing-id or non_string_input classification.
- Set ALLOWED_ROOT_TYPES to ['object'] and confirm the array and number get quarantined.
Service Value
Ready-made workflow template for automation delivery and service execution.
Apps Used
Details
How to Use
- 1.Click "Download Template"
- 2.Open your n8n dashboard
- 3.Go to Workflows > Import from File
- 4.Select downloaded file and configure credentials
Nodes Used (8)
Run Demo Manually
Manual Trigger
Emit Sample JSON Texts
Code
Parse Each Text Safely
Code
Parsed Successfully?
If
Mark Valid Record
Set
Mark Quarantined Record
Set
Combine Both Branches
Merge
Build Diagnostic Report
Code
Note Overview
Sticky Note
Note Setup
Sticky Note
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