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
Super User
Super User

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
Super User
Super User

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!

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?

Super User
Super User

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!

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

Super User
Super User

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

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!

Super User
Super User

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
firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,296)