Skip to main content

Count the items returned by a node

Workflow preview

Count the items returned by a node preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

Overview

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.