Skip to content
Implementing a dela...
 
Notifications
Clear all

Implementing a delay in HTTP GET requests for each bundle

4 Posts
3 Users
0 Reactions
6 Views
Chris2
(@chris2)
Posts: 2
New Member
Topic starter
 

Hi,
I have the following challenge:

  • I have a query on an Airtable table that returns multiple record IDs (see screenshot; callin.io refers to these as bundles. In the example, 10 Airtable records = bundles are correctly found).
  • Next, I need to query an HTTP GET request (see screenshot 2) for each Airtable ID found. The restriction on the HTTP URL I'm using (a free stock quote API) is a maximum of 5 requests per minute. How can I implement a delay between each HTTP query so that only 5 HTTP GET queries are sent per minute? For instance, in this scenario, 10 Airtable records are found, meaning the subsequent HTTP queries must be executed over 2 minutes (as the maximum is 5 per minute). Is there any other way to solve this? Thank you!
    2023-06-06_22h11_33
 
Posted : 06/06/2023 8:19 pm
sArchitect
(@sarchitect)
Posts: 3
New Member
 

Hi there,

Welcome to the community! You can achieve this by using the Increment function module (to count executions) along with the 'Sleep' module to pause execution for 2 minutes.

The Increment module can count up to 5 operations, after which the Sleep module will activate to delay the process.

 
Posted : 07/06/2023 1:41 pm
Runcorn
(@runcorn)
Posts: 16
Active Member
 

Hi,

In addition to the suggestions provided, an alternative approach is to utilize the sleep module without an iterator. This method allows for a 1-minute delay for every 5 bundles processed.

You can configure it as follows after your Airtable Search Module:

Screenshot from 2023-06-08 12-19-46

In the screenshot above, the Iterator Module corresponds to your Airtable Search Module. Therefore, you can place the sleep module between the HTTP and Airtable modules. For added resilience, consider incorporating a Break module within the HTTP module. This ensures that if an error occurs due to rate limiting, the process will resume from the point of failure.

 
Posted : 08/06/2023 6:36 am
Chris2
(@chris2)
Posts: 2
New Member
Topic starter
 

Thank you! It worked perfectly!

 
Posted : 08/06/2023 7:48 pm
Share: