⚒️ Count the items returned by a node

3,829 views · ⚒️ Engineering

Description

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

It uses a Set node with the Execute Once option:

image.png

The expression uses $input.all() (documented here) to fetch all incoming items at once, and .length (documented for example here) to count them.

🔗 Nodes Used

Customer Datastore (n8n training)

📥 Import

Download workflow.json and import into n8n: Workflow menu → Import from File

📖 Importing guide · 🔑 Credential setup