Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Updating "File type" column for existing files in Sharepoint

(0) ShareShare
ReportReport
Posted on by 26

Hi everyone,

 

I'm trying to use PA to update a column for a host of files already in Sharepoint. My idea was to use "For a selected file" as a manual trigger and just apply it to a folder containing just files or the lowest folder depending on how I can get this to work. I wanted to do this by getting the folder's properties using "Get file properties", run "List folder" to see what's inside, then use "Apply to each" to grab the file extensions then use that to update the "File type" column that I made.

 

When I try to use "Name" as the identifier, "Apply to each" nests itself like so

waterni_2-1718058692776.png

and returns this error when I test it.

waterni_3-1718058707058.png

I feel like the solution should be obvious, but I can't get past this part. Please help 😞

  • abm abm Profile Picture
    32,472 Most Valuable Professional on at
    Re: Updating "File type" column for existing files in Sharepoint

    Hi @waterni 

     

    Glad that all sorted and working. Thanks for accepting the solution.

     

    Thanks

  • waterni Profile Picture
    26 on at
    Re: Updating "File type" column for existing files in Sharepoint

    @abm 

    I got it to work, the problem was the "Include nested items". If I change it to "No", it works but only for the items in that specific directory. Leaving it on gives me empty output. Thank you for your help.

  • waterni Profile Picture
    26 on at
    Re: Updating "File type" column for existing files in Sharepoint

    @abm 

    I tried the box templates but the return was the same.

    waterni_0-1718213159992.png

     

     

  • abm abm Profile Picture
    32,472 Most Valuable Professional on at
    Re: Updating "File type" column for existing files in Sharepoint

    Hi @waterni 

     

    Try to create that flow using out of the box templates like in my video. See the initial part of the video. Then delete those unwanted steps.

     

    Thanks

  • waterni Profile Picture
    26 on at
    Re: Updating "File type" column for existing files in Sharepoint

    @abm 

    I followed along with your video, the only difference is for "Get file properties", the "Id" in your video and mine was different so I entered for function you had associated there (triggerBody()?['entity']?['FileId']). I've tried it with just the regular Sharepoint "ID" but the results were the same.

    waterni_0-1718211807870.png

     

     

  • abm abm Profile Picture
    32,472 Most Valuable Professional on at
    Re: Updating "File type" column for existing files in Sharepoint

    Hi @waterni 

     

    So that means you are not getting the anything from Get File properties step? You sure you mapped the right mappings in that compose?

     

    Thanks

  • waterni Profile Picture
    26 on at
    Re: Updating "File type" column for existing files in Sharepoint

    @abm 

    Thank you for the video.

    I've been following it but I'm running into a problem with the compose around 7:56. My outputs does not look like yours and just returns nothing.

    waterni_0-1718211295021.png

    waterni_1-1718211306583.png

     

  • Verified answer
    abm abm Profile Picture
    32,472 Most Valuable Professional on at
    Re: Updating "File type" column for existing files in Sharepoint

    Hi @waterni 

     

    I made a tutorial video based on this. Please have a look and comment.

     

    https://youtu.be/c192fYIGCXU

     

    Thanks

  • abm abm Profile Picture
    32,472 Most Valuable Professional on at
    Re: Updating "File type" column for existing files in Sharepoint

    Hi @waterni 

     

    I will post something soon. I understood your requirement. Thanks for the clarification.

     

  • waterni Profile Picture
    26 on at
    Re: Updating "File type" column for existing files in Sharepoint

    @abm 

    waterni_0-1718122609053.png

    It's something I found in a different post where someone was having problems with their path not being in JSON. turns "/" into "%2F"

     

    Ideally, yes I am looking into folders within folders but I was prepared to run this only on folders without nested folders. I'm not certain how low many levels it goes up to but the highest I found was 10.

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >