cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Anybody knows how to reduce API calls using Flow?

 
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User II
Super User II

Re: Anybody knows how to reduce API calls using Flow?

Select will do nothing to limit your API calls, every time you use it you increase your API calls. Please see the Use the select action portion of the Data operations documentation:


Use the Data Operations – Select to transform the shape of the objects in an array. For example, you may add, remove, or rename elements in each object in an array.

A Filter Array will filter only the results within the array that you care about, from that point you can utilize other data operations like select. 

Your Apply to Each is what is creating the vast majority of your API calls, so you need to perform data filtering prior to the loop to limit the apply to each to only the relevant data, and not all data. 

If you need all of the data, and you keep hitting API thresholds, then your only real option is to build in delays within your Flow, so you don't exceed thresholds. 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

7 REPLIES 7
Highlighted
Super User II
Super User II

Re: Anybody knows how to reduce API calls using Flow?

I'm afraid you'll have to expand what you mean further for us to have a better understanding of what you mean by reducing API calls. Such as providing details of what API calls you're speaking of, or when the API calls occur, or the to what the API calls are coming from, etc.  

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Highlighted
Anonymous
Not applicable

Re: Anybody knows how to reduce API calls using Flow?

Hi @Brad_Groux ,

 

I have a GET API call and I'm using its output, one of the array inside, on my "Apply to each" and inside my loop is a POST API call. My problem was whenever the POST API call runs, the number of API calls is the same as the number of records in the array. Is it possible to have a batch run?

Highlighted
Super User II
Super User II

Re: Anybody knows how to reduce API calls using Flow?

You could add a Filter Array to only run the Apply to Each on the output of the array (example). If you could provide an expanded screenshot of your Flow and steps we could likely better assist you.

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Highlighted
Anonymous
Not applicable

Re: Anybody knows how to reduce API calls using Flow?

Here is my current flow. Can you please confirm the difference of using "Select" between using "Filter Array". Thank you.

 

flow 1.pngflow 2.png

Highlighted
Super User II
Super User II

Re: Anybody knows how to reduce API calls using Flow?

Select will do nothing to limit your API calls, every time you use it you increase your API calls. Please see the Use the select action portion of the Data operations documentation:


Use the Data Operations – Select to transform the shape of the objects in an array. For example, you may add, remove, or rename elements in each object in an array.

A Filter Array will filter only the results within the array that you care about, from that point you can utilize other data operations like select. 

Your Apply to Each is what is creating the vast majority of your API calls, so you need to perform data filtering prior to the loop to limit the apply to each to only the relevant data, and not all data. 

If you need all of the data, and you keep hitting API thresholds, then your only real option is to build in delays within your Flow, so you don't exceed thresholds. 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

Highlighted
Anonymous
Not applicable

Re: Anybody knows how to reduce API calls using Flow?

Hi @Brad_Groux ,

 

Question. If I will delay my flow a day or two and its trigger will run again the next day. Will the flow stack up?

 

My process is getting the list of users with the "Last Sign in Date" as yesterday on a daily basis. Thanks!

Highlighted
Super User II
Super User II

Re: Anybody knows how to reduce API calls using Flow?

If you have your Flow set to start on a schedule, and that schedule begins before the previous Flow run finishes, it'll start a second run of the Flow. It won't cancel previous runs to begin a new one. 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Helpful resources

Announcements
Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Top Solution Authors
Top Kudoed Authors
Users online (7,713)