Showing results for 
Search instead for 
Did you mean: 
New Member

Update folder properties when file added or modified

Hi, I am a newbie to Flows and trying to do create my first flow for the below requirement:


We have a Sharepoint library with multiple folders and each folder has multiple files. There is a custom field on each file called "Expiration Date". We capture the latest of all "Expiration Date" as "Expiration Date" for the folder it is in. This is currently being done manually - once we add/modify a file in folderx we set the "Expiration Date" of that file to X. Then we order all the files in that folder by "Expiration Date", take the latest value and update the folder's "Expiration Date" (if required).


I am trying to build a flow to automate this. Since there are existing files and folders already have value of "Expiration Date" i thought may be all i have to do is compare "Expiration Date" of new/modified file with folder's and only update the value if the file's "Expiration Date" is later than the folder's.


I tried to build the flow "when a file is created or modified (properties only). Added the Sharepoint Site, library name etc. Added a step to update "Expiration Date" and tried to create a condition to compare file's "Expiration Date" field with the folder's. Can't figure out how to compare these two value and also unable to find out how i can update the "Expiration Date" of a particular folder.


Any help on this is appreciated. 




Community Support
Community Support

Hi @kssaran,


I am afraid using this trigger will not work for the files within a folder.

Currenlty this trigger is only available to get the updated files, and it is not working for folder.

So the scenario you mentioned may not working using the current Flow trigger.

There are ideas submitted for folder trigger:

SharePoint Trigger by folder




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

Thanks for your reply Michael

Helpful resources

Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (5,880)