feat(Execute Sub-workflow Node)!: Remove "Run once for each item" mode
Merged
FL
2mo ago+42+42+01234567890123456789-421-421-012345678901234567890123456789
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.
- 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
modeparameter is kept as a hidden property, gated to@version <= 1.3. This is deliberate:Workflowconstruction rebuildsnode.parametersfrom the declared and displayed properties only, so without the declaration a staleeachvalue would be stripped and the workflow would silently run asonce, 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,
modeis 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 onmaster; this PR is only the removal.
Behavior overview
| Node version | mode: 'each' present | Behavior |
|---|---|---|
| <= 1.3 | yes | Editor warning + runtime failure with migration instructions |
| <= 1.3 | no | Runs once with all items |
| 1.4 | injected via API/JSON | Value stripped, runs once with all items |
| 1.4 | no | Runs once with all items |
How to test
- 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.
- Start n8n from this branch.
- Open the node: no Mode field renders, and a warning notice explains that the node uses the removed mode and how to migrate.
- Execute the workflow: the node fails with the removal error and migration instructions.
- Save the workflow without changes and execute again: it must still fail (the hidden declaration preserves the stale value through save-time parameter normalization).
- 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, orBackport to v1(if the PR is an urgent fix that needs to be backported)
๐ค PR Summary generated by AI
๐ค Generated with Claude Code