Skip to content
Data & Databases

Record Schema Unifier with Missing-Field Gap Report

6 nodes 72 6 Manual trigger
Download

Loading workflow…

Workflow Description

A fully local workflow: a manual trigger feeds a Code node emitting heterogeneous fictional records; a second Code node computes the union of top-level keys, infers each key's type, fills absent/undefined/null fields with typed defaults, and records filled keys per record; a Set node adds filled_count and is_complete; a final Code node aggregates one summary item with totals, defaults map, and unified records with no undefined values and no external calls.

How it works

  1. 1.Run the workflow manually from the Manual Trigger
  2. 2.A Code node emits fictional records: one with groups, one with adminGroups, one with groups:null, plus a non-object invalid case
  3. 3.The unify Code node computes the key union, infers types, fills gaps, and documents them in filled_fields
  4. 4.The Set node adds filled_count and is_complete while retaining all fields
  5. 5.The final Code node emits one report item with totals, per_key_defaults, and normalized records, filtering the internal stats item

Use cases

  • Normalizing nested irregular API responses before binding expressions
  • Detecting records with missing fields in data pipelines
  • Preparing schema-consistent data for downstream n8n nodes

Requirements

  • No credentials and no external calls
  • n8n 2.45.5 with default Code, Set, NoOp nodes
  • For real use, replace the sample emitter with an HTTP Request output using the same json.record schema

Setup and testing in n8n

  1. Import the JSON into n8n and click Execute Workflow
  2. Verify every record carries the same key union with no undefined
  3. Check filled_fields per record, filled_count, and that total_fields_filled=6
  4. Test no-valid-records: set the emitter array to [{record:null}] and verify a correct report (total=1, valid=0, invalid=1)

Service Value

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

Apps Used

Manual Trigger Code Set No Op

Details

Trigger Manual trigger
Nodes 6
Apps 4
Views 72
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 (6)

Manual Trigger

Manual Trigger

#1

Emit Fictional Sample Records

Code

#2

Unify Schema and Fill Gaps

Code

#3

Tag Each Record Gap Count

Set

#4

Build Gap Report Summary

Code

#5

Done

No Op

#6

Sticky: Setup

Sticky Note

#7

Sticky: Fill Rules

Sticky Note

#8

Sticky: Output

Sticky Note

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