I can't get HTTP Request to do pagination to Gumlet API

Describe the problem/error/question

I am trying to get a list of video resources via Gumlet API ( List Assets ).

It collects the first page, but somehow the pagination magic doesn’t work at all.

Here’s how I setup the pagination there:

What is the error message (if any)?

Executing this returns:

The returned response was identical 5x, so requests got stopped
Check if “Pagination Completed When” has been configured correctly.

And if I try to limit the pages fetched, it ends up returning only the page of offset=0. Somehow, it doesn’t progress any further.

What am I doing wrong?

Information on your n8n setup

I am running the cloud version

Hi @Tsahi_Levent-Levi,

As per your screenshot, the value of the response expression you have is red with “Undefined”. Can you show me the value of {{ $response }} only.

I think I figured it out - the completion rule should have been different - should check for something like total_asset_count == 0 (somehow, Gumlet thought it a good idea to set it to 0 when offset of “off”)

If you want to retrieve all items, set offset = 0 then go with this condition:

{{ $response.body.current_offset == $response.body.total_asset_count }}

Note that the size and offset query parameters can be a bit confusing, so test first to understand the logic,

In this example, since I don’t have many items, I set size = 1 and start with offset = 0: