cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

Replacement for Alert on a library folder and its sub folders

I managed to use "When a file is created in a folder" trigger, to send email when a new file is added to a selected folder in a selected library.

Cool,

But I want all file / attributes changes on the folder and all the sub folders of the selected folder.

Can I change the code to achive that? how?

Anyone knows an example like this I can start form?

 

Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Replacement for Alert on a library folder and its sub folders

Hi @Ogal ,

 

Make sure you are using the trigger When a file is created or modified (properties only)  instead of the trigger When a file is created in a folder, and you could leave the Folder field blank for trigger the flow when a file is created or modified in the library.

 

Best regards,

Alice       

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

11 REPLIES 11
Dual Super User
Dual Super User

Re: Replacement for Alert on a library folder and its sub folders

Cahnge the trigger from when a file was created to when a file is created or modified.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Highlighted
New Member

Re: Replacement for Alert on a library folder and its sub folders

Thx

Will it trigger on changes in a sub folder?

Highlighted
Super User
Super User

Re: Replacement for Alert on a library folder and its sub folders

@Ogal 

I agree with @Pstork1 - if your change the trigger the Flow will fire and emails will be sent for changes.  That said, you may end up generating a ton of emails - possibly more than one email when an individual is editing a document.  You may want to consider using a recurrence trigger that runs, for example, once an hour.  Then, use a Get Files (properties only) action and a Filter Query that will only retrieve file info for files that have been modified in the last hour.  Use a loop and send emails as appropriate for each file.

If you want an example, let me know.

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
Highlighted
Super User
Super User

Re: Replacement for Alert on a library folder and its sub folders

@Ogal 

Using a When a File is created or modified trigger will fire on changes to documents at the root or in any folder.  If you want to limit the scope to a folder, use the When a file is created or modified in a folder trigger and specify the folder.

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
Highlighted
New Member

Re: Replacement for Alert on a library folder and its sub folders

All of these triggers are only good for the specified folder. not it's sub folders.

Do I need to add a workflow for each of the sub folders? Does not seem like a good optin.

Highlighted
Dual Super User
Dual Super User

Re: Replacement for Alert on a library folder and its sub folders

If the trigger is on the root folder it should be firing for the root and all the sub folders.  You shouldn't need one for each folder.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Highlighted
New Member

Re: Replacement for Alert on a library folder and its sub folders

I tested.

It only triggers changes to the folder selected in the trigger. not it's subfolders.

Highlighted
Super User
Super User

Re: Replacement for Alert on a library folder and its sub folders

@Ogal 

Please post a screen shot of your Flow.

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
Highlighted
Dual Super User
Dual Super User

Re: Replacement for Alert on a library folder and its sub folders

Make sure you are using the When a file is created or modified (properties only)  that will fire on every file in the library.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Highlighted
Community Support
Community Support

Re: Replacement for Alert on a library folder and its sub folders

Hi @Ogal ,

 

Make sure you are using the trigger When a file is created or modified (properties only)  instead of the trigger When a file is created in a folder, and you could leave the Folder field blank for trigger the flow when a file is created or modified in the library.

 

Best regards,

Alice       

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
New Member

Re: Replacement for Alert on a library folder and its sub folders

I created a new one (no way to change the trigger) with " When a file is created or modified (properties only) " but did put a folder because it is the requirment.

The person getting the email has no access to the rest of the library.

Anyway it worked on subfolders.

 

Thank you all for the help.

Helpful resources

Announcements
firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

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!

Top Solution Authors
Users online (9,424)