Pulling all data from a paged REST API

Hi there,

Here is my setup:

Select the start and end date and click the button, this will fire query1. The initial call to the API will return the pages object. Upon successful completion of query1 it will trigger query3:

query3 will extract the starting_after key's value from the response of query1, add it to additionalScope and trigger query2.

The response of the query2 will contain a pages object that will point to page 3. Again, extract out, add it additionalScope and fire query2. Rinse and repeat till we are at the last page.

The issue: query3 fires off once and then doesn't complete, it keeps running infinitely returning just the second page.

In case you'd like to see the video of the issue, here's the screen recording of the issue I am running into: Screen Recording 2023-04-12...

If someone could take a look and provide some help, I will be grateful.


Hey @Anand!

It sounds like query2 might be failing, causing the Promise created in query3 to never resolve. Would you mind sharing a screenshot of your debug tools during this process? I'd be interested to see what's being passed to it as additional scope when it's triggered: