I use API Calls which eventually have a next parameter in their response. If this parameter is in the result from the API I need to call this URL in the parameter to get the next items of the API. This has to be done so long until the next parameter does not exist in the response. Otherwise I won’t get all required data from the API.
The easiest way in Bubble is to set up a recursive backend workflow. First, configure your API Connector to include the “next” parameter from your API response. Then, create a backend workflow that checks if the “next” parameter exists. If it does, schedule another API call using that URL as a parameter. Continue scheduling calls until the “next” parameter is empty, ensuring you retrieve all the data.
That is a good hint, thank you. I have one question as I am not able to extract the next parameter of the request. The requests looks as follows:
{
"data": [
{
"access_token": "XXX",
"name": "Test 1",
"id": "123"
},
{
"access_token": "YYY",
"name": "Test 2",
"id": "567"
}
],
"next": "URL to use for next page"
}
I got it to run with Backend Workflow the correct type of things and list to run on (the list is the data object). But than the next param is not used of as it is not part of the list.
Now if I don’t use the body data but the whole request and try it as the following image shows it does not work. There might be an error. But how should I extract the next parameter as it is not part of the list? That is not clear for me how that could be achieved.