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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Error in 'Apply to Eac...
Power Automate
Unanswered

Error in 'Apply to Each' in 'get file metadata' section.

(0) ShareShare
ReportReport
Posted on by

I'm getting an error in the Apply to each section of a Flow i'm building. The purpose of the flow is to auto archive files that have a Modified date of 6 months or older. The Flow works up until the "Apply to each" section. In the Get File Metadata section specifically. 

The error looks like this: 

flow5.PNG

 The files and folders exist in that SP online url, I have the correct permissions, etc. 

Here is the configuration of that section, ive tried 2 versions. one with Path and one with Current item. 

flow3.PNGflow4.png

Can anyone tell me what I am doing wrong? I'm at a loss. 

 

 

Categories:
I have the same question (0)
  • fchopo Profile Picture
    8,003 Moderator on at

    Hello @Anonymous ,

     

    You could use the "Get Files (properties only)" action, instead of using "Get File Metadata". I attach a simple flow that stores the modified date of each document in a variable:

     

    2019-12-11 20_12_46-Create your flow _ Microsoft Power Automate.png

    If you want to improve the performance of your flow, you could even use some expressions, like the one used in this article.

     

    Hope it helps!

  • Community Power Platform Member Profile Picture
    on at

    I use the get files (properties only) in the flow a little earlier

     

    flow6.PNG

     

    The test version uses a 15 day variable, it will ultimately be a 6 month variable when it works. This is what the that looks like: flow2.PNG

    so as you can see i'm doing both. I thought the metadata part was to tell the apply to each section what exactly it needs to copy to the new location. 

    I'm pretty new at this, thanks. 

    Also that article is very useful, thanks. Still haven't resolved this though 🙂 

  • Gristy Profile Picture
    2,429 on at

    yea your flow will not work you are passing in a object not what it actually needs.

     

    try putting the identifier int he file to copy part

  • Community Power Platform Member Profile Picture
    on at

    it dies before that point, it dies with Get File Metadata. flow7.PNG

    Per your advice I tried this, but it still errors out before the second part. It gives this error trying to get metadata so all the following steps fail. 

     

     

  • Gristy Profile Picture
    2,429 on at

    if you already have the identifier, why do you need the get file metadata step is it needed?

  • v-alzhan-msft Profile Picture
    on at

    Hi @Anonymous ,

     

    Your flow run failed since the "Get file metadata" action couldn't get the metadata of the folder.

    Please add a Condition outside the "Get file metadata" action as screenshot below:

    1.png

     

    Best regards,

    Alice       

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

  • Community Power Platform Member Profile Picture
    on at

    why that specific condition? I dont get what youre telling me to do

  • Community Power Platform Member Profile Picture
    on at

    This gets me further away from what Im trying to do. 

    it errors out on the condition. 

  • v-alzhan-msft Profile Picture
    on at

    Hi @Anonymous ,

     

    Please share a screenshot of the error message so we could better understand your issue.

     

    Best regards,

    Alice       

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

  • Community Power Platform Member Profile Picture
    on at

    that option takes me further not closer to a solution. 

    This is what im trying to do.

     

    https://powerusers.microsoft.com/t5/Webinars-and-Video-Gallery/Microsoft-Flow-Tutorial-Auto-Archive-SharePoint-Files-6-Months/td-p/153930

     

    This is like a 5 minute tutorial for auto archiving files in a sharepoint online site when they are not modified for 6 months or less. I do what he does except mine gives the errors documented earlier in this post. 

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard