
Hey guys,
I am trying to build a flow, which is triggered, when within a Folder, a subfolder is created.
I have multiple folders for every supplier in our company in a sharepoint library. When a subfolder is created within a supplier-folder, the flow should get triggered. But only for the sub-folders, not for the root folders.
So the procedure should work as followed:
Step 1: A supplier folder is created ( nothing to do )
Step 2: Within the supplier folder, a new sub-folder is created ( now the flow must trigger )
The flow should also trigger only once. So, if a second sub-folder is created in the corresponding root folder, there should be a condition, that checks if there is already an exisiting sub-folder and will not start any actions, if so.
My current problem is, that I am not sure, how to archieve, that only sub-folders trigger the flow.
Here I definitly need your help 🙂
If someone also has an idea, how to define the condition to check for exisiting sub-folders, I would be grateful.
Thank you in advance for your help and have a great day.
Dear I,
By my knowledge there is no ready-made trigger which allows you to do as you described.
The alternative I can think of is a scheduled trigger (Re-occurence) which may run every 10, 30, 60 minutes (whatever is suitable). Once triggered the flow will check all the existing folders from the root with a 'List all files in folder'. If there are folders found, it will again run a 'List all files in folder' on that folder ... etc. etc. until there is a complete map of the folder structure from the root.
All the found folders are saved in a file (Excel/Sharepoint) and all the paths are compared to the previous file (created in the previous flow run). If there are any new paths found, then ... execute your other actions.
Happy flowing,
Koen