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

Anybody knows how to reduce API calls using Flow?

 
1 ACCEPTED SOLUTION

Accepted Solutions

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
Brad_Groux
Community Champion
Community Champion

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!

Anonymous
Not applicable

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?

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!

Anonymous
Not applicable

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

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!

Anonymous
Not applicable

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!

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
October Events

Mark Your Calendars

So many events happening this month - don't miss out!

 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (3,067)