How to Limit Number of Items Processed During Workflow Testing?

Context

I’m building a workflow that processes a list of rows (e.g., from NoCoDB or Google Sheets). Each item is passed to an AI agent and then through additional structured parsing and branching logic.

Challenge

When I test the workflow in the editor, n8n seems to automatically select an arbitrary number of items to test with — sometimes just one or two, sometimes many more.

This behavior is unpredictable, and when working with expensive operations like OpenAI API calls, I’d like to test only 1 to 5 inputs at a time.

Tried

  • I know I can use a Limit node or slice the array in a Function node, but I’m referring specifically to the built-in test behavior in the UI — where the workflow is executed in “Test” mode and not “Full Run.”
  • I couldn’t find a way to control how many items get passed forward during those tests — it doesn’t seem tied to the real data size or any editable parameter.

Question

Is there any way — either via settings, workflow config, or best practices — to control or limit the number of items processed during test executions, without having to filter or rewire the actual production logic?

I’d like to be able to test deterministic slices of data (say, the first 3 rows that match a condition) without modifying the main workflow or having to re-run full batches and burn tokens unnecessarily.

1 Like

Hi @danielrosehill

I’m not sure if something like this exists in n8n, but I have an idea to share:

If you want to test with “deterministic slices of data” without modifying your current workflow, consider creating a separate workflow as a unit test…

This new workflow would retrieve your “list of rows (NoCoDB or Google Sheets)” with your specific configuration, and you can use its output as the input for your main workflow.

If everything works as expected, you can then connect the primary trigger…

1 Like