web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Updating Medadata in d...
Power Automate
Unanswered

Updating Medadata in document library Using Flow

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

OVERVIEW

The company I work for holds contract documents for all our clients in SharePoint using a document library. We have been organizing document using folders AND we want to start using metadata to better organize documents.

PROBLEM

We have hundreds of documents in this document library and we don’t want to have to go through each document to update the column value (metadata).

EXAMPLE

So, say I have a folder named Fruit and within that folder there are subfolders named: apple, banana, pear. I have a column (metadata) in the document library to specify the color. I want to update the “color” column value for all documents in banana folder to “yellow”.

QUESTION

Is there a way to update ALL document’s metadata in a select folder with a given value?

Categories:
  • ScottShearer Profile Picture
    25,331 Most Valuable Professional on at

    @Anonymousthe short answer is yes....

     

    I suggest using a Button trigger to start the Flow (this is just a one time update).

    Then, use a switch statement inside of a for each loop to check the Folder Path.  If the Folder Path contains, for example, Apple, update the file appropriate metadata column to yellow using the Update File Properties action to Green.

     

    If you have more than 5000 documents, there are other considerations.

     

    Let me know if you want an example.

     

    Scott

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    An example would be VERy helpful!

     

    I am not sure about the ACTION to update a documents medadata ether. 

     

    This would save my team a load of time!

  • ScottShearer Profile Picture
    25,331 Most Valuable Professional on at

    @Anonymous:

     

    Before I respond further, are you averse to configuring and using SharePoint default column values?

    Also, is there version history that you need to keep?

     

    The reason I am asking is that, going forward, you can use column default values to automatically populate metadata columns based on the folder.  That will mean that your users won't need to populate the columns.

     

    If you want to use column default values,  a simple way to do this might be to simply create a new copy of each document in the library (via Flow) and delete the original.  Doing so implies that the version history will be lost.

     

    My original idea of using a switch statement won't work well for a variety of reasons, but using conditions/if statements will work.  The problem is that it will be a long and ugly Flow.

     

    There are other ways to approach this as well.

     

    That said, the easiest way would be to configure column default values and copy/delete as I explained above.

     

    Will this work for you?

     

    Scott

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    First off thanks for your response, 

     

    So, I do see what you’re saying about default columns and that is an option. 

     

    I am hesitant because the document library contains very secure documents that have been in this location for years AND getting rid of the version history would not be ideal in this case. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 289

#2
11manish Profile Picture

11manish 282 Super User 2026 Season 2

#3
Henil Profile Picture

Henil 119

Last 30 days Overall leaderboard