Data between nodes: items and JSON

n8n · Essentials · 11 min

Almost every confusing result in n8n comes from not knowing how many items flowed into a node.

Data in n8n is passed between nodes as a list of items. Think of an item as one row in a spreadsheet: one customer, one email, one order.

Each item stores its fields as JSON, a common text format for data. JSON writes data as "name": value pairs inside curly braces. Values can be text in quotes, numbers, true/false, a list in square brackets, or another set of curly braces (a nested object, like an address inside a customer). The example shows two items.

Under the hood each item wraps its fields in a json key, and items carrying files (a PDF, an image) also have a binary key. You rarely need to type this yourself; the editor shows it.

The key rule: most nodes run once for each incoming item. If a Google Sheets node outputs 50 rows, a following Gmail node sends 50 emails, one per row, each using that row's data. You don't need to build a loop for this.

This rule explains many surprises:

  • "Why did it send 50 messages?" Because 50 items arrived.
  • "Why did nothing happen?" Because 0 items arrived (the previous node found nothing).

The item count appears on each connection line and in each panel, so check it whenever a result looks wrong.

If you really want a node to act once regardless of how many items arrive, turn on Execute Once in the node's Settings tab; it then uses only the first item.

Example

[
  { "name": "Ana Lopez", "email": "ana@example.com",
    "address": { "city": "Lisbon" }, "tags": ["vip", "eu"] },
  { "name": "Ben Okoro", "email": "ben@example.com",
    "address": { "city": "Lagos" }, "tags": [] }
]

Remember

  • Nodes pass a list of items; each item holds JSON fields
  • Most nodes run once per incoming item
  • Check the item count when results look wrong

Watch out for

  • Expecting one Slack message but sending one per item because many items reached the node.

Check yourself

  1. A node outputs 12 items into a "Send email" node. By default, how many emails are sent?

Sign in to answer, see the explanations, and get this lesson back as a quick review later.

Official docs: docs.n8n.io/build/work-with-data/understand-n8ns-data-structure