A question about subflows in integration templates

Hi,

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?

An example template is this one: Automate Web Interactions with Claude 3.5 Haiku and Airtop Browser Agent | n8n workflow template

Thanks,

L

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.

2 Likes

Great, thanks! I shall keep on keeping on!

L

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.