cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
frazzmata
Helper I
Helper I

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

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. 

 

 

10 REPLIES 10
fchopo
Super User II
Super User II

Hello @frazzmata ,

 

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!

Did I answer your question? Please consider to mark my post as a solution to help others.
Proud to be a Flownaut!

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
Resident Rockstar
Resident Rockstar

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

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
Resident Rockstar
Resident Rockstar

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

Hi @frazzmata ,

 

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.

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

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

it errors out on the condition. 

Hi @frazzmata ,

 

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.

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-...

 

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. 

Helpful resources

Announcements
User Groups Public Preview

Join us for our User Group Public Preview!

Power Automate User Groups are coming! Make sure you’re among the first to know when user groups go live for public preview.

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Users online (77,660)