Count the items returned by a node

Go to Workflow
3,203 views
Built by Tom Tom
Created on April 17, 2023

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:



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

This workflow was created by Tom and shared publicly on the n8n community template library. n8nFind indexes it for discovery — the workflow remains the property of its original creator.

Nodes Used (1)

Customer Datastore (n8n training)
n8n-nodes-base.n8nTrainingCustomerDatastore