Reference > Core Concepts

Connections and Data Flow

Reference for how data moves between n8n nodes as JSON items.

Data as JSON Items

All data in n8n flows between nodes as an array of items. Each item is a JSON object with a json property containing the actual data:

[
  {
    "json": {
      "name": "Alice",
      "email": "alice@example.com"
    }
  },
  {
    "json": {
      "name": "Bob",
      "email": "bob@example.com"
    }
  }
]

Items can also carry a binary property for file data (images, PDFs, CSVs).

How Connections Pass Data

When a node finishes executing, its output items are sent to every node connected to its output handle. Each downstream node processes the received items independently.

By default, an action node runs once per item it receives. A node that receives 5 items will execute its operation 5 times, producing up to 5 output items.

Note

Some nodes (like Code, Merge, and Summarize) receive all items at once and can output a different number of items than they received.

Branching

Use branching to route items down different paths based on conditions.

IF node -- evaluates a condition for each item and sends it to either the true or false output:

[IF] --true-->  [Slack: Send Message]
      --false-> [Email: Send]

Switch node -- evaluates a value and routes each item to one of up to four named outputs, plus a fallback output.

Tip

Every item must go somewhere. Use the fallback output on a Switch node to catch items that do not match any rule.

Merging Data

The Merge node combines data from two or more input branches. It supports several modes:

Mode Behavior
Append Concatenates items from all inputs into a single list
Combine Matches items by position or field value and merges their properties
Choose Branch Waits for all inputs but only passes data from a selected branch

Accessing Upstream Data

Within a node's parameters or expressions, you can reference data from any previous node:

{{ $json.email }}              // current item's field
{{ $('Node Name').item.json.email }}  // specific upstream node's field
{{ $input.all() }}             // all items from the immediate parent

Common Patterns

  • Fan-out / Fan-in -- Split items into individual paths with IF or Switch, process them, then merge back with Merge.
  • Looping -- Use Split In Batches to iterate over large datasets in controlled chunks.
  • Pairing -- Use Merge in Combine mode to join data from two different API calls on a shared key.

Related tips: Data Transformation, Workflow Architecture

See Also

Showcase builds

19 complete workflows from my own projects, each with its n8n workflow JSON to import. Showcase entries link the file at the end of the article.

See the showcase builds

Keep reading

191 entries grouped by topic, from first workflow to queue mode. Free, no signup.

Browse the encyclopedia

Need it built?

I design, build and run n8n systems for clients. Every engagement starts with a $1,500 diagnostic audit, credited toward the build.

Book a 20-minute call