Re: Power Automate flow runs slowly (apply to each)
Hi @Anonymous
1.) Why do you think the properties are unnecessary? You could use them (for example) to check if the properties should be updated at all. Because if all properties are already set to the values of the excel file, you won't even have to update. Even if you would need this new array. I don't get why you have to use an apply to each for it. All information you need is stored in the first action "Get files (properties only) 2". Select takes an array and gives you an array back. And also if you don't need a key-value pair you could switch to text mode and only set one value. So no apply to each and no "Get file properties" needed.
2.) The formula looks good but you won't need a variable to update it. Instead of "variables('varDate1')" you can also put in the value the dynamic content you first used to set the variable. So you don't have to initialize those variables and because it is inside an apply to each you save a lot of steps.
3.) PA adds an apply to each automatically if you select a value inside an array. We will get to this later.
4.) OK, let's get to this later too.
5.) What if there is an entry in excel and you don't find that file on sharepoint?
6.) What if there is a file on sharepoint but no entry inside of excel?
I will try to summarize everything again and you can tell if I understood it correctly.
There is an excel where somebody fills out detailed information about files stored on Sharepoint. You want to update the file properties of each file on Sharepoint with the information stored in excel. I didn't get the information about the lists you talked about and where they are used.
I think if I got it correct and you answer the last questions I hopefully have all the information to redesign the flow.
2.)