This is probably a very basic question. I’ve noticed that many integration templates include a sub-workflow in them. What I’ve been doing is cutting and pasting the sub-workflow in a new workflow and calling that. Is that what I’m supposed to do? Can the workflow stay in the template, with N8n determining if it should run as the main trigger or as a sub-workflow?
You can put the sub-workflow anywhere you want, whether it is the same workflow or in a separate workflow. Just make sure you update the calling node to point to the correct place.
As a best practice rule though, I prefer to put each sub-workflow in its own workflow. This way it’s a lot cleaner for maintenance and you dont run into issues when your main workflow depends on calling multiple sub-workflows.
The reason the templates have them in one is for ease of sharing.