Skip to content
Data & Databases

Nested Value Extractor with Per-Parent Completeness Reconciliation

9 nodes 84 6 Manual trigger
Download

Loading workflow…

Workflow Description

A self-contained n8n workflow driven by a Manual Trigger and fictional sample data. A Code node iterates every element of a parent array and resolves a configurable nested path such as attachments[0].file.url, emitting exactly one item per parent tagged with parent index, parent id, full source path and extraction status. An IF node splits successes from failures, two Set nodes normalise fields while keeping identifiers, a Merge node with two independent inputs re-joins both paths, and a final Code node aggregates everything into one reconciliation report matching parent count against output count with a failure breakdown.

How it works

  1. 1.Manual Trigger starts the run and emits one empty item
  2. 2.Sample Payload emits a fictional payload with an orders array of five mixed elements
  3. 3.Extract Nested Values resolves the nested path per parent and emits one item per parent with index and status
  4. 4.IF checks extraction_success, routing true to output 0 and false to output 1
  5. 5.Format Extracted adds branch=extracted and value_status=ok
  6. 6.Format Missing adds branch=not_extracted, copies the failure reason into value_status, then passes a NoOp audit node
  7. 7.Merge in append mode joins both branches through two independent inputs
  8. 8.Reconciliation Report runs once for all items and returns a single report with counts, values and failures

Use cases

  • Pulling file URLs out of nested attachment arrays per order
  • Detecting which records lack the nested path before handing data downstream
  • Reconciling incoming record counts with extracted value counts in transformations
  • Auditing the quality of JSON payloads received from external APIs

Requirements

  • n8n 2.47.7 or newer
  • No credentials and no network nodes required
  • Adjust PARENT_FIELD and VALUE_PATH inside the Extract Nested Values node
  • Replace Sample Payload with a real source emitting the same schema in production

Setup and testing in n8n

  1. Import the JSON into n8n
  2. Click Execute Workflow and open Reconciliation Report
  3. Verify parent_count=5, output_item_count=5, extracted_count=2 and reconciled=true
  4. Verify failure_breakdown shows missing_path, empty_value and invalid_element each equal to 1
  5. Edge case: set orders to an empty array and confirm the report shows parent_count=0 with the missing-array note
  6. Edge case: change VALUE_PATH to a non-existent path so all items route to the false branch with missing_path

Service Value

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

Apps Used

Manual Trigger Code If Set No Op Merge

Details

Trigger Manual trigger
Nodes 9
Apps 6
Views 84
Downloads 6

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 (9)

/

Manual Trigger

Manual Trigger

#1

Sample Payload

Code

#2

Extract Nested Values

Code

#3

Extraction Succeeded?

If

#4

Format Extracted

Set

#5

Format Missing

Set

#6

Audit Failures

No Op

#7

Merge Branches

Merge

#8

Reconciliation Report

Code

#9

Note Config

Sticky Note

#10

Note Routing

Sticky Note

#11

Note Report

Sticky Note

#12
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