cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Advocate I
Advocate I

Apply Flow only to Root Folder of SharePoint Documents

I have created a Flow that occurs when a new Channel is created within Teams. Since that creates a folder within the related Documents Library in SharePoint, I have it automatically creating additional Folders within that created "Channel Folder".  

Flow Folder.JPG

I have it set so that the when the Correspondence folder is created, it doesn't trigger the Flow again. However, if someone adds a folder within one of these folders, the Flow triggers again.

 

How can I make sure that this flow will only happen when it's on the Root, but also provide the flexibility if a folder is needed within one of these folders?

 

1 ACCEPTED SOLUTION

Accepted Solutions

Haveyou considered using trigger conditions?

 

Or would you prefer to use conditions.

 

I woudl probably have a look at the output from the trigger and check if you have the url of the folder that is created anywhere. Then split that by '/' and count the number of elements. this should then help you configure the condition to identify if you have a folder/channel or a subfolder

View solution in original post

2 REPLIES 2

Haveyou considered using trigger conditions?

 

Or would you prefer to use conditions.

 

I woudl probably have a look at the output from the trigger and check if you have the url of the folder that is created anywhere. Then split that by '/' and count the number of elements. this should then help you configure the condition to identify if you have a folder/channel or a subfolder

View solution in original post

I was so close, but I had some blinders on. While I had used conditions to make sure that if the folder did not match one of the names of the folders, I didn't think to use the conditions to have it look at the Folder Path and have it end with "Shared Documents/" 

While it will still triggers the workflow if you are right in Shared Documents - the main goal is to make sure it doesn't trigger within the folders - and for what we need, most often the end users would not be in the root of Shared Documents.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Top Kudoed Authors
Users online (13,050)