Getting all paginated results from api call

I am using the Call API node to query our CRM for all tickets on a given day in order to then create a summary of the most common issues. The result from the api is paginated and they provide an “after” parameter in order to call again to retrieve further data. I’m having trouble knowing how to set things up similar to a “while” loop in order to repeatedly call the api until I’ve fetched all the tickets. Can someone point me in the right direction?

Hey Spencer! I’d recommend using the Custom node here instead of the call API node, the custom node will be able to manage paginated responses and cycle through them to get all of the data you need.

You also get a little AI input that can help you write the code!

Thanks, I’ll take a look!

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.