cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mhines
Level: Powered On

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
Super User
Super User

Re: Apply Flow only to Root Folder of SharePoint Documents

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
Super User
Super User

Re: Apply Flow only to Root Folder of SharePoint Documents

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

mhines
Level: Powered On

Re: Apply Flow only to Root Folder of SharePoint Documents

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
firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors
Users online (5,091)