Large Binary Data: Why 100 PDFs Kill the Server
n8n keeps binary data in RAM: 100 PDFs can crash the server. Here's how Filesystem or S3 mode helps prevent memory explosion.
How the Execute Sub-workflow Node and Trigger split large n8n workflows into reusable, maintainable modules.
A workflow with fifty nodes, three nested IF branches, and five different data sources looks impressive at first glance, but in practice it is a maintenance nightmare. Every small change to the invoice check tears open the entire customer order workflow, and every new colleague needs an hour just to understand what the workflow actually does. This is exactly the problem n8n solves with sub-workflows: one workflow calls another, gets its result back, and continues, much like a function in classic code.
Instead of a monolith, this creates small, self-contained building blocks that can be tested individually, changed individually, and reused across multiple workflows. This article shows how sub-workflows work technically in n8n, how you split an existing automation into modules, and what you need to watch out for regarding data flow and error handling. As of: July 2026.
According to the n8n documentation on breaking workflows into smaller parts you can call a workflow from within another workflow. This lets you build modular, microservice-like workflows instead of packing everything into a single huge process. A sub-workflow is nothing other than a completely normal n8n workflow that is specifically built to be triggered by another workflow and to return a result.
Two nodes form the foundation of this relationship: in the calling, parent workflow sits the Execute Sub-workflow Node, and at the very start of the called workflow sits the Execute Sub-workflow Trigger Node, also known as "When Executed by Another Workflow". The trigger is mandatory: without it, a sub-workflow cannot be started from the outside.
The benefits are noticeable in practice, not just theoretical:
Anyone in a company who automates many recurring processes, such as quoting or invoicing processes, benefits especially from this modularization. You can find more on such automations under digital employees at NordFlux.
To make a workflow usable as a sub-workflow, you add the Execute Sub-workflow Trigger Node right at the start. According to the documentation, it must be the first node in the workflow. Three modes are available for the expected input data:
For sub-workflows used in production, the first or second option is usually the better choice, because clearly defined inputs surface errors early instead of letting them appear only in the middle of the process.
In the parent workflow, you add the Execute Sub-workflow Node and specify which workflow should be executed. According to the n8n documentation on the Execute Sub-workflow Node four sources are available for this:
You also set the execution mode: either pass all input items to the sub-workflow in a single execution, or start the sub-workflow once per input item separately. The Wait for Sub-Workflow Completion option determines whether the parent workflow waits for the result or continues immediately without waiting for completion.
Data travels in a clear, two-stage pattern: the Execute Sub-workflow Node in the main workflow sends its data to the Execute Sub-workflow Trigger Node in the called workflow. There it passes through the further nodes of the sub-workflow, and the last node in the sub-workflow sends its result back to the Execute Sub-workflow Node in the main workflow. The "View sub-execution" link lets you trace this execution in both directions, an important tool when debugging nested automations.
You should be aware of one important limitation: if the sub-workflow contains errors, the parent workflow cannot trigger it successfully. A cleanly running, tested sub-workflow is therefore a prerequisite, not an option.
If you do not want to start from scratch, you can directly convert existing workflow parts. According to the n8n documentation on converting to sub-workflows you mark the desired nodes on the canvas, right-click on the background, and select "Convert to sub-workflow" from the context menu.
Fixed rules apply to the selection:
You should also plan for a few pitfalls: according to the documentation, the feature is available on all plans from n8n version 1.97.0, but newly created sub-workflows use the v1 execution order, which can differ from the settings of the original workflow. Support for AI nodes is limited, connected sub-nodes must be fully included in the selection, and shared nodes may need to be duplicated. You should also carefully check access functions such as first(), last(), and all(), as well as the itemMatching function, which requires fixed numeric indices instead of expressions, after the conversion before putting the new sub-workflow into production.
Imagine a workflow that checks incoming requests, creates a quote, formats it as a PDF, and sends it by email. Instead of bundling all of that into one process, it can be split up cleanly: one sub-workflow "validate customer data", a second "calculate quote", a third "generate and send PDF". The main workflow calls these three modules one after another and passes the results along. If the pricing logic changes later, only the second sub-workflow is adjusted, everything else stays untouched. NordFlux implements exactly this kind of modular, well-maintainable automation for SME customers, so that you keep control of your processes even as complexity grows.
A sub-workflow is worth it as soon as logic is needed more than once or a workflow becomes so large that it gets confusing. For very small, one-off processes with few nodes, on the other hand, the extra call overhead is rarely worth it, a single workflow is usually sufficient here.
Yes, sub-workflows can be nested, a called workflow can itself contain another Execute Sub-workflow Node. In practice you should keep an eye on the nesting depth so that the structure stays understandable and errors can still be traced when debugging.
If the sub-workflow contains errors, the parent workflow cannot, according to the documentation, trigger it successfully. Every sub-workflow should therefore be tested on its own and equipped with clean error handling before other workflows are made dependent on it.
According to n8n documentation, sub-workflow executions do not count against your plan's monthly execution or active workflow limit. This makes modules especially attractive if you have many recurring sub-processes that would otherwise each run against your limit individually.
Yes. Using the "Convert to sub-workflow" feature, you mark connected nodes with exactly one entry and one exit point and convert them into a standalone sub-workflow via right-click. Afterward you should check the execution order and expressions used in the new sub-workflow once more.
Founder of NordFlux. Spent four years automating processes at enterprise scale at Dräger, and now brings that depth to the mid-market — pragmatic and with full data sovereignty.
Certifications
n8n keeps binary data in RAM: 100 PDFs can crash the server. Here's how Filesystem or S3 mode helps prevent memory explosion.
Error workflows, Retry On Fail and Teams notifications: how to build reliable error handling in n8n.
If you lose the n8n encryption key, all stored credentials become unusable. Here is how to back up workflows, credentials, and keys correctly.
A single giant workflow gets harder to maintain with every new requirement and becomes nearly impossible for new team members to follow. NordFlux structures your n8n automations into reusable sub-workflows and can take over ongoing development on request. In an initial conversation we look at your current workflow structure.