cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Ogal
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
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.
Ogal
New Member

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

Thx

Will it trigger on changes in a sub folder?

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
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
Ogal
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.
Ogal
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.

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
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.
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

Ogal
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
Did you attend MBAS? Claim your badge

Attending MBAS? Claim your badge

Whether you’ve streamed the digital event live, or you're watching on-demand, claim your attendee badge to sport on your profile.

MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: 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!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Users online (5,096)