n8n AI input aggregation: fields and nulls in Aggregate
Collect records into a list and inspect field selection, nulls and nested arrays before sending data onward.
Choose whole records or individual fields · Name the list and select its fields · Null retention and list merging are separate
At a glance
The goal is to collect records into one field for an AI input. You need workflow editing access and records with stable id and text fields. The official Aggregate page was checked, and synthetic projections were inspected locally. n8n and a model were not run. Aggregation organizes data; it does not summarize it.
Input, configuration and output checks
Define input
Inspect identifiers and field types.
Configure the operation
Choose the documented mode and relevant options.
Inspect results
Check mapping and output before downstream use.
Choose whole records or individual fields
Aggregate offers Individual Fields and All Item Data. The former collects selected field values; the latter collects item data. If downstream results must map back to input, use synthetic records a/first passage and b/second passage to establish that id and text must remain, then select All Item Data. Collecting text alone does not establish that ids remain. The choice follows the downstream contract.
Name the list and select its fields
Put Output in Field names the All Item Data result; this exercise uses records. Include offers All Fields, Specified Fields and All Fields Except. The exercise selects id and text and locally projects two matching records without auxiliary fields. Individual Fields can Rename Field; when aggregating multiple fields, not all output field names can be empty. Inspect actual names before adoption.
Null retention and list merging are separate
For Individual Fields, Keep Missing And Null Values retains null values when enabled and otherwise ignores them. Merge Lists flattens list values when enabled and retains individual lists when disabled. Add a text:null record and an array field to decide between placeholders and omission, or nesting and flattening. Shape changes mean equal lengths do not prove identity correspondence. Binary data has a separate Include Binaries option.
Inspect record mapping before a model call
Local checks modeled id/text projection, null retention and flattening; they did not reproduce node execution. In a small workflow, inspect records type, count, ids and text before connecting a model input. Stop on positional mismatch, output-name collision or a downstream item-list expectation receiving one list field. One output item does not establish a valid text or token budget.
Article sources
Original editorial content; official descriptions and checking suggestions are distinguished.