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 Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (3,368)