Hello all,
I have a pretty complex Flow that is running correctly, but very slowly.
Purpose of the Flow: to check 170 rows (unique values) from an Excel worksheet in a document library where are 400 folders and if the unique keys from Excel are matching with the unique keys from the name of each folder -> then to update Excel row with the hyperlink of the corresponding folder if no -> to update Excel row with the text "Item not found" . The problem is that for doing these steps Flow needs about 2 days, that I consider is enormous:
Flow looks like below:
Does anyone know how can I optimize the mechanics of the Flow, in order to reduce the running time?
Any help would be appreciated.
Thank you!
Solved! Go to Solution.
Thank you, @efialttes for suggestions, but I think a found the appropriate solution.
I will switch to OneDrive instead of SharePoint, where I have the action "Find files in folder":
Instead of comparing each row from Excel with each name of folder in SharePoint, "Find files in folder" action from OneDrive is considerably faster.
Thank you!
Hi!
Flows with nested Apply to Each's + Condition inside indeed have a poor performance.
I would replace 'Apply to Each 2' and use 'Filter Array' instead. After 'Filter array' you can add a Condition to evaluate if nr of matches is greater than 0 by using the following expression:
length(body('Filter_array'))
Then on the true branch of this condition you can apply your logic (Get folder metadata etc), also on the false branch (Update a row 2 etc)
You can also consider to activate 'Apply to each' paralel execution
Hope this helps
Proud to be a Flownaut!
Also, make sure the document library columns are Indexed Columns if they are used in Queries from PowerAutomate actions.
Hi @efialttes,
If you mean like this:
Unfortunately, it does not bring any modifications in running time.
Or I understood something wrong?
Thank you @rsaikrishna.
I have 4 columns all of them where indexed by me some hours ago and still no changes:
Hi!
I am afraid I shoud be more precise in my initial suggestion:
"I would replace 'Apply to Each 2' and use 'Filter Array' instead. After 'Filter array' you can add a Condition..."
You should assign the same input to your Filter array than the one currently assigned to 'Apply to each 2'. And remove 'Apply to each 2' also.
It will probably take you some time to convince Flow editor.
Hope this helps
Proud to be a Flownaut!
Thank you, @efialttes.
For me, it will be nice to have it now, but as I understood in this moment it's not possible to make my Flow faster.
Wai, wait, wait
An alternate easy approach to test
Did you tried to activate 'Concurrency' in your first 'Apply to each'? JUst give it a shot to see if iperformance gets improved
The 'Filter array' approach is a bit complex to implement since Flow Editor with try to add an extra 'Apply to each'
Thanx!
Proud to be a Flownaut!
Thank you, @efialttes for suggestions, but I think a found the appropriate solution.
I will switch to OneDrive instead of SharePoint, where I have the action "Find files in folder":
Instead of comparing each row from Excel with each name of folder in SharePoint, "Find files in folder" action from OneDrive is considerably faster.
Thank you!
Wow.... Great job, @jeneaMD ! And, thanx for sharing!
I am sure other community members facing this issue in the future will find your solution so clever and so useful, the first one me!
You guys make this community great!
Proud to be a Flownaut!
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Read the latest about new experiences and capabilities in the Power Automate product blog.
User | Count |
---|---|
23 | |
20 | |
9 | |
9 | |
8 |
User | Count |
---|---|
39 | |
30 | |
26 | |
23 | |
12 |