cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted

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
Highlighted

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

Highlighted
Advocate I
Advocate I

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (8,258)