feat(Execute Sub-workflow Node)!: Remove "Run once for each item" mode

Merged
FL
2mo ago
+42-421

Summary

Removes the "Run once for each item" mode from the Execute Sub-workflow node, per the v3 breaking-changes tracker. This mode does not behave correctly in combination with waiting, and a Loop Over Items node achieves the same behavior.

2
  • Removes the Mode selection from the node panel and adds node version 1.4. The node always runs once with all items.
  • On versions 1 to 1.3 โ€” the versions where the mode could legitimately be set โ€” the mode parameter is kept as a hidden property, gated to @version <= 1.3. This is deliberate: Workflow construction rebuilds node.parameters from the declared and displayed properties only, so without the declaration a stale each value would be stripped and the workflow would silently run as once, changing what data the sub-workflow receives. The hidden declaration lets the stored value survive so the node can fail loudly instead.
  • A workflow saved with mode: 'each' on version <= 1.3 shows a warning notice in the editor and fails at runtime with: The "Run once for each item" mode is no longer available, instructing the user to replace the node and add a "Loop Over Items" node before it.
  • On version 1.4, mode is not declared. A value injected via the API or workflow JSON is stripped during parameter normalization and the node runs once with all items โ€” the standard n8n treatment for parameters that are not part of a node version's contract.
  • The v3 breaking-change detection rule (execute-workflow-each-mode-v3) and the deprecation notice already shipped on master; this PR is only the removal.

Behavior overview

Node versionmode: 'each' presentBehavior
<= 1.3yesEditor warning + runtime failure with migration instructions
<= 1.3noRuns once with all items
1.4injected via API/JSONValue stripped, runs once with all items
1.4noRuns once with all items

How to test

  1. On a current release build, create a workflow: Manual Trigger โ†’ Execute Sub-workflow with Mode set to "Run once for each item", pointing at any sub-workflow.
  2. Start n8n from this branch.
  3. Open the node: no Mode field renders, and a warning notice explains that the node uses the removed mode and how to migrate.
  4. Execute the workflow: the node fails with the removal error and migration instructions.
  5. Save the workflow without changes and execute again: it must still fail (the hidden declaration preserves the stale value through save-time parameter normalization).
  6. Create a new Execute Sub-workflow node: it is created at version 1.4 with no Mode field and runs once with all items.

Unit tests cover the removed-mode failure and the once paths.

Related Linear tickets, Github issues, and Community forum posts

https://linear.app/n8n/issue/CAT-4214

Review / Merge checklist

  • I have seen this code, I have run this code, and I take responsibility for this code.
  • PR title and summary are descriptive. (conventions)
  • Docs updated or follow-up ticket created.
  • Tests included.
  • PR Labeled with Backport to Beta, Backport to Stable, or Backport to v1 (if the PR is an urgent fix that needs to be backported)

๐Ÿค– PR Summary generated by AI

๐Ÿค– Generated with Claude Code