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 / How to stop my Power A...
Power Automate
Suggested Answer

How to stop my Power Automate flow updating column metadata on individual files inside a folder.

(0) ShareShare
ReportReport
Posted on by 78
Hello all,
 
I have a power automate flow I have been using for over a year, in the last 6 months, I had created an addition to my flow, which the flow will grab text from the filepath to update a column with that text. It had been working fine up until last week, when the flow was updating the column for the folder (which is correct), and now is updating the metadata column of individual items in that folder (which is incorrect).
 
The flow runs if the conditions are met, i.e. isfolder = yes, and so it will update the metadata column of the folder, but now it is updating files. Unfortunately I am at the Microsoft limit of condition levels, so I cannot create anymore levels to my flow, and the parent and child flows have disappeared from Sharepoint, and when I went to look at creating one, it deemed too time consuming and difficult for me to achieve.
 
any help would be appreciated. Below is a snapshot of part of my flow (for company reasons, some text is omitted).
 
This is the split expression I am using which is towards the beginning of the flow as variables have to be placed there.
 
The first condition is checking the folder, if it is a subfolder and then branches off to yes or no.
 
The 2nd condition in the No
The flow will continue to run if it is a Folder, so it should not continue to run on the individual files in the folder, but it does.
 
The YES result of the above condition, will run in update file properties (as below), the Document Originator metadata column will update based on the output from the foldername variable (above)
 
so the end result of each folder for the Document Originator column is below:
 
However, when I look inside the folder, the Document Originator metadata column for every file in there has been updated too, but with the entire name of folder title, and I am unsure why it is doing this, because there is nothing in my flow which should be doing this, because the foldername variable wouldn't do this.
 
 
Thank you all.
Categories:
I have the same question (0)
  • Suggested answer
    Riyaz_riz11 Profile Picture
    4,150 Super User 2026 Season 1 on at
    Hi,
     

    Looking at your flow, I can see the issue. The problem is that your "Update file properties 2" action is being triggered for both folders AND files, even though your condition checks IsFolder = true. This is happening because Power Automate is processing all items in the library that meet your trigger conditions.

    When your flow runs, it's likely being triggered by a library-level event that processes multiple items. Even though you have a condition checking IsFolder = true, the flow is still executing the "Update file properties 2" action on files within those folders.

     

    Solutions

    Solution 1: Add File Type Filter (Recommended)

    Add an additional condition right before your "Update file properties 2" action to double-check that you're only updating folders:

    And
    ├── IsFolder is equal to true
    └── Name does not contain "."

    The logic here is that folders typically don't have file extensions, while files do.

    Solution 2: Use Content Type Filter

    Add a condition to check the content type:

    And
    ├── IsFolder is equal to true  
    └── ContentType is equal to "Folder"

    Solution 3: Filter in Your Trigger

    If possible, modify your trigger to only fire for folders by adding a filter condition at the trigger level rather than within the flow logic.

     

    Solution 4: Use Item Path Logic

    Add a condition that checks if the item path ends with the item name (which would indicate a folder):

    And  
    ├── IsFolder is equal to true
    └── endsWith(triggerOutputs()?['body/Path'], triggerOutputs()?['body/Name']) is equal to true
     

    Immediate Fix

    Add this condition right before your "Update file properties 2" action:


    1. Click "New step" before "Update file properties 2"

    2. Add a "Condition"

    3. Set it to: IsFolder is equal to true

    4. Move your "Update file properties 2" action inside the "Yes" branch of this new condition


    5.  
     

    This will create a nested condition that provides an additional safeguard against updating files.

    Alternative Approach

    If you're still hitting the condition limit, consider consolidating some of your existing conditions by using more complex expressions. For example, instead of multiple separate conditions, you could use a single condition with a complex expression like:

    and(equals(outputs('Get_file_properties')?['body/IsFolder'], true), not(contains(outputs('Get_file_properties')?['body/Name'], '.')))
     
    If I have answered your question, please mark it as the preferred solution ✅ . If you like my response, please give it a Thumbs Up 👍.
    Regards,
    Riyaz
  • buro2020 Profile Picture
    78 on at
    Thank you @Riyaz_riz11,
     
    Your suggestions of a condition will work for another flow of mine, but the flow I am referring to is at it's maximum number of levels and Microsoft Power Automate will not allow me to add another level.
     
    So I am bit stuck on how to reduce the levels to put the condition as you suggested below.
     
    Yes your responses are great, but not achievable for my current problem flow.
     
    Wayne
  • Tomac Profile Picture
    4,105 Moderator on at
    @buro2020 Can you add the suggested items to an existing Condition in your flow that's already checking if the item is a folder?

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 816

#2
Valantis Profile Picture

Valantis 603

#3
Haque Profile Picture

Haque 566

Last 30 days Overall leaderboard