Tips > Reliability & Performance

Diagnose "No Data" Issues by Checking Item vs Array Output

The number one beginner mistake in n8n is a node receiving "no data" when the previous node clearly produced output.

In n8n, a node showing "no data" when the previous node produced output almost always means an item-structure mismatch. Nodes pass arrays of items, each with a json property. If a Code node returns a plain object instead of [{ json: ... }], or an API returns a single object where you expected an array, downstream nodes receive nothing.

What causes "no data" between n8n nodes?

The number one beginner mistake in n8n is a node receiving "no data" when the previous node clearly produced output. This almost always happens because of an item structure mismatch. n8n nodes communicate using arrays of items, where each item has a json property. If a Code node returns a plain object instead of an array of items, or if an API returns a single object when you expected an array, downstream nodes receive nothing or behave unexpectedly.

Real-world example: A Code node processes API data but the next node shows "No items" even though the Code node shows output.

How do you return items in the correct format?

Returning a plain object leaves the next node with no data:

// This Code node output will cause "no data" in the next node
const result = {
  name: "Jane Martinez",
  email: "jane@example.com",
  score: 85
};
return result;  // n8n does not know how to pass this forward

The correct version returns an array of items, each wrapped in { json: ... }:

// Each item must be wrapped in { json: { ... } }
const result = {
  name: "Jane Martinez",
  email: "jane@example.com",
  score: 85
};
return [{ json: result }];

For multiple items, map each record into the n8n item format:

const records = [
  { name: "Jane", score: 85 },
  { name: "Bob", score: 72 },
  { name: "Carlos", score: 91 }
];

// Map each record to the n8n item format
return records.map(record => ({ json: record }));

What are the common variations of this mistake?

Common variations of this mistake:

// 1. Returning a Promise without awaiting it
// WRONG:
return fetch('https://api.example.com/data');
// CORRECT:
const response = await fetch('https://api.example.com/data');
const data = await response.json();
return [{ json: data }];

// 2. API returns { results: [...] } but you expected [...]
// WRONG expression in next node:
{{ $json[0].name }}
// CORRECT expression:
{{ $json.results[0].name }}

// 3. Forgetting to return from the Code node
// WRONG: function ends without return
const items = $input.all();
items.forEach(item => { item.json.processed = true; });
// CORRECT: must return the items
const items = $input.all();
items.forEach(item => { item.json.processed = true; });
return items;

When you see "no data" in a downstream node, always check: (1) does the previous node's output panel show data, (2) is the data in the correct [{ json: {...} }] format, and (3) are expressions referencing the correct property path?

Related: Always Set an Error Workflow on Every Production Workflow · Break Large Workflows into Sub-Workflows

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

190 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 an introductory call