I have a parent folder 'a' and I know that this will contain sub-folders with varying names e.g 'b' 'c'. I want to recognise when a file is added to any of these subfolders.
How can I get MSFlow to recognise 'When an item is created in a subfolder of this folder' as I won't know the specific subfolders name from the start of the flow,
I tried using the 'When an item is created in this folder' but it only recognises direct children, and not children of subfolders. It is only a 2 level hierachy, as I'll have parent folder -> child folder -> child document
Thanks!
Solved! Go to Solution.
I found a solution for this issue:
Use the connector for items instead of files, here, select as List -> custom value -> enter the name of your document library). This connector will trigger for every created/modified file.
To filter some results out of this, for example, that this flow doesn't trigger when a folder is created/modified, use the following trigger condition:
@equals(triggerOutputs()?['body/{IsFolder}'],false)
You can also define a folder, in which the flow only needs to active, you can do this with the following trigger condition:
@equals(startsWith(triggerOutputs()?['body/{Path}'],'Library name/Folder name/subfolder name/'),true)
Or you can define a switch/condition to add multiple folders to your flow.
Hope this helps for some! It did for me!
KR,
Kurt - DWP Analyst /ICT application engineer at Imec vzw
When I have customers ask for sub-folder additions. They are usually specific. The user will save a file with a specific tag in the file names. For example, a user adds a file and adds to the file name "_For Review". I create a condition that looks for a file that contains that specific name in the file name. Just a thought!!!