FM
FlowMarket
General Automation Beginner ⚡ 3 n8n Nodes

Count the items returned by a node

This workflow provides a simple approach to counting the items returned by a node. It uses a Set node with the Execute Once option: The expression uses $inpu...

🔌 Nodes & Integrations Used (1)

n8n Core Logic

📖 Implementation & Setup Guide

This workflow provides a simple approach to counting the items returned by a node.

It uses a Set node with the Execute Once option:

The expression uses `$input.all()` (documented [here](https://docs.n8n.io/code-examples/methods-variables-reference/)) to fetch all incoming items at once, and `.length` (documented for example [here](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/length)) to count them.

⚡ How to import this workflow into n8n:

  1. Click the Direct Download JSON button above to save Count the items returned by a node.json.
  2. Log in to your n8n Cloud or self-hosted n8n instance.
  3. In your workflow canvas, click the menu in top-right and select Import from File (or paste the JSON directly).
  4. Configure your credentials (e.g. API keys, database URLs) in the corresponding node settings.
  5. Click Execute Workflow to test and switch to Active!

Related General Automation Workflows

View All in General Automation →