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

Community site session details

Session Id : 3jNzG91FXuXa/bnws7+1DQ
Power Automate - Using Flows
Unanswered

Improve the power autoamte flow execution + minimize the requests count

Like (0) ShareShare
ReportReport
Posted on 16 Oct 2024 16:24:02 by 1,634 Super User 2024 Season 1
I have this Child Power Automate flow that is been called 3,000 times each day from different automated and scheduled flow all over our solution.
The flow manually does those main actions: -

    1) Accepts a list GUID + Item ID
    2) Stop Permission inheritance of the Item.
    3) Iterate over all the Item Permissions >> Remove Them >> Reassign them with Read.

As follow: -
 
 
 
So now if we take an example where the list item has 7 permission been granted to it from the list, then the flow will be performing those number of requests: -

    1 request to Break the Permission Inheritance
    1 request to Get all Permissions (For example 7 permissions)
    2 Requests inside each ApplyToEeach Iteration, so total requests will be 14

So total requests for each flow run will be = (1 + 1 + 14) = 16 requests
Now i am trying to use Batch calls to reduce the number of requests been generated + improve the performance.
Here is my plan :-
1- Combine the first 2 calls into one POST Patch call, as follow:-
 
 
2- Combine the 2 actions of removing the Permission and reassign them with Read, by one Batch call.
3- So, the flow should be doing those numbers of calls: -
 
1-Batch-Call + (1 * 7) = 8 requests instead of 16. which is a good way to start with.
 
But I have those 2 main questions: -

Q1)  When I do the first Batch call, how I can get the results from calling the second POST request, which is responsible for getting all the permission items after breaking the permission inheritance, so i can loop thorough them?
Q2)  If I want to be more optimistic, can I combine all the calls inside the loop into one Batch? so my flow will be only running 2 requests?
 
 
My plan to do 2 main improvements:-

1) Improve the performance
2) Force my power automate flow to do less Requests. keeping in mind that doing an API call to SharePoint is considered as one request, also initializing a variable or setting a variable is considered as 1 request also.
 
Thanks in advance for any help.
 
Regards
 
Attached is the code for the Body request, as i am unable to post the code here
--batch_1234.txt

Your file is currently under scan for potential threats. Please wait while we review it for any viruses or malicious content.

I have the same question (0)

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

MS.Ragavendar – Community Spotlight

We are honored to recognize Ragavendar Swaminatha Subramanian as our September…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 736 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 396 Moderator

#3
Power Apps 1919 Profile Picture

Power Apps 1919 339

Last 30 days Overall leaderboard

Featured topics

Restore a deleted flow