I need to check if a folder exists and create one if it doesn’t.
However, in both cases, I need to create subfolders (all in the red outlined part on the right) inside either the existing folder or the newly created one.
Is there a way to avoid repeating the same action after the router results?
A module won’t accept 2 inputs. (Even the router has 1 in, multiple outs)
Yes, You can do this by using Set Variable Module, what you will need to do is after the create folder module on top route set a variable named rootFolderID or something to your liking. And, then continue the upper route if required.
Now, In the route that currently handles conditions for Folder Exists, Remove the existing filter which will ensure that both conditions will go through the route. Put a Get Variable module with variableName specified in the previous route i.e rootFolderID.
Afterwhich, You can get the folderID for bothe cases by using ifempty(rootFolderID;folderIdFromSearchModule).