Subarray Key Labelled Rows Report Builder
Read the execution path horizontally, with supporting AI nodes below. Layout changes affect this preview only; the download stays unchanged.
Loading workflow…
Workflow Description
A manual-trigger workflow loads a fictional object with two named subarrays (2 invoices, 3 shipments) plus edge fields (empty array, non-array value). A Code node flattens every array element into a row labelled by the array key, keeping the element's own values unmixed. A Set node orders report columns, a parallel Code node sums subarray lengths, and an IF node compares it to the row count, routing mismatches to a deviation report naming both numbers before one final aggregated report.
How it works
- 1.Run the manual trigger to emit the fictional sample object with named subarrays and edge-case fields
- 2.A Code node scans object keys and emits one row per array element with label, position and original values
- 3.A Set node orders label, position and source_values while retaining other fields
- 4.A parallel Code node sums subarray lengths and merges with the rows
- 5.An IF node compares counts: match passes through NoOp, mismatch builds a deviation report naming both numbers
- 6.A final Code node aggregates everything into a single report item
Use cases
- Flattening JSON objects with named subarrays into one labelled report table
- Auditing split integrity by comparing row count to summed array lengths
- Preparing source-labelled rows for downstream analysis or export
Requirements
- n8n version 2.44.4
- No external credentials and no network calls
- Replace the sample object inside the loader Code node with real data of the same schema for production use
Setup and testing in n8n
- Import into n8n 2.44.4, execute manually, expect one report with status ok and five rows
- Verify labels_present equals exactly invoices and shipments
- Edge test: empty an array or force a count mismatch and expect a deviation report naming both numbers
- A valid empty source produces an ok report with zero rows; an invalid source produces a deviation report with the reason. Verify unique source positions.
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 (11)
Run Manual Demo
Manual Trigger
Load Sample Source Object
Code
Flatten Subarrays Into Labelled Rows
Code
Order Report Columns
Set
Sum Subarray Lengths
Code
Merge Rows With Expected Count
Merge
Verify Row Integrity
Code
Counts Match
If
Integrity Confirmed
No Op
Build Deviation Report
Code
Build Final Report
Code
Sticky Setup
Sticky Note
Sticky Derivation Rule
Sticky Note
Sticky Verification
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