Sub-Workflow executes on multiple items but only returns single one

Describe the problem/error/question

In my main workflow I call a sub-workflow in the “Run once for each item” mode with “Wait For Sub-Workflow Completion” turned on.

When I input this with multiple items, it doesn’t wait until all items are finished processing and just outputs a single output item.

To note the sub-workflow does a lot of things but also can contain a Wait node configured as a webhook receiver.

Please share your workflow → Sub-workflow Node

Information on your n8n setup

  • n8n version: 2.3.6
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker on Railway

Hi @Nathan_De_Troyer

If you need to gather all results at the end, the sub-workflow can’t pause in the middle with a Wait node. A Wait turns each item into its own detached execution, so the parent flow can’t truly wait for all of them to finish.

The safest pattern is either to remove the Wait and keep the sub-workflow fully synchronous, so “Wait For Sub-Workflow Completion” works for every item, or to go fully async: store each result in an external place (like a database or table) and use a separate workflow later to collect and consolidate everything.

Damn that sucks since the wait is in a sub-workflow of the sub-workflow and as such the sub-workflow should be “synchronous” since it’s abstracted from the async part.

Would working with webhooks be a workaround in this case?

@Nathan_De_Troyer

Using webhooks can work, but only as part of an async pattern, not as a drop-in synchronous workaround. You would trigger the sub-workflow, let it pause on the Wait/webhook, and when each item finishes it would call back (via webhook) into another workflow that stores or aggregates the result.

So the practical options are still the same: either keep the entire called workflow tree free of Wait nodes to stay fully synchronous and get all items back at once, or embrace async with webhooks and an external store and do the final aggregation in a separate consolidation step.