Preflight Type Collision & [object Object] Risk Detector
Loading workflow…
Workflow Description
A local manual-trigger workflow feeds a heterogeneous test payload into a recursive Code node that builds a full-path to observed-types inventory across records. It flags paths typed object/array (implicit [object Object] string-conversion risk) and paths whose types collide across records, splits them via IF into danger and safe NoOp branches, merges both (append, indexed inputs), and aggregates everything into one summary item with matching counters.
How it works
- 1.Run the Manual Trigger which emits an empty item
- 2.A Code node emits the fictional test payload matching the real schema
- 3.A depth-first Code node maps every full field path to observed types and record counts and flags danger
- 4.A Set node formats a report line retaining all fields (includeOtherFields)
- 5.IF routes dangerous paths (true) versus safe paths (false)
- 6.Two NoOp branches feed a Merge node in append mode with inputs 0 and 1
- 7.A final Code node aggregates all rows into ONE summary item with counters
Use cases
- Auditing heterogeneous API responses before writing string expressions
- Detecting per-field type collisions across records before full runs
- Documenting which fields will render as [object Object]
Requirements
- No credentials needed; all processing is local
- For real data replace the sample Code node with an HTTP Request or Webhook output of the same schema
Setup and testing in n8n
- Import the workflow into n8n 2.45.7
- Run the Manual Trigger and check the final summary: 10 paths, 4 dangerous, 6 safe
- Verify age, meta, tags and tags[0] appear in dangerous with type_collision or implicit_object_to_string reasons
- Remove the sample node and pass zero items to test the empty-input path
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 (9)
Run Preflight Check
Manual Trigger
Sample Payload (replace with real API items)
Code
Build Path→Types Inventory & Detect Collisions
Code
Format Report Row
Set
Is Field Dangerous?
If
Dangerous Path Endpoint
No Op
Safe Path Endpoint
No Op
Merge Danger & Safe Branches
Merge
Build Single Summary Report
Code
Detection Rule Doc
Sticky Note
Branches Doc
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