Executing a module repeatedly while a condition exists

Hello. I’m still relatively new to the Make space, but loving it so far.

I’m currently using the Zoom “Make an API call” module to retrieve a list of webinar participants, and it’s working great. However, this particular participants endpoint returns pages of data, so if there’s more data available to retrieve beyond the current response page, the response will include a next_page_token property that is used in next API call to get the next page of data.

Does anyone know a pattern to use for this particular scenario, where I can repeatedly call a module, collecting responses until a condition is met (in this case, next_page_token doesn’t exist or is null)? Or do I need to use filter/routes, add another api call module, and clone everything downstream to the new route?

Any thoughts/guidance is greatly appreciated.

Hey Tony,

Yes, your requirement can be achieved using the following modules and conditions

  1. Repeater module with a large number of repetitions.

  2. Use filter i.e. output text {not equal to} empty

  3. Use a Text Aggregator to combine entire data/text as final output.

It would looks like this.

1 Like

Awesome. Thank you for replying. I was wondering it may be something using this repeater. But still hung up on one thing. I need to include the next_page_token value on any subsequent API calls. It’s presently not including it, so keeps returning the first page of data.

Here’s example output from a ZOOM api call:

image

That next_page_token value needs to become a query string parameter on the next API call. I’m guessing I need to use a custom variable for this?