Trying to get pagenation working

Describe the problem/error/question

Getting pagination to work after a set field

What is the error message (if any)?

ERROR: Bad request - please check your parameters

400 - “{"error":"invalid value for Integer(): \"\""}”

When i hardcode the page number to a URL or Query param, it works, however when i use an expression that changes the number dynamically, it never works, but the page number shows correctly in green

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Can you share the workflow?

Hi, share it like an image. so when i see the URL with the expression, it looks correct, so i am expecting the endpoint to be{{expression}} the preview of the URL shows with the number 2, which is what i am expecting

But it is not working, but same thing happens when i hardcode it with 2 it works


so for example, the above images do not work even though the page parameter shows correct, but hard-coding des, i have spent ages on this, and i almost give up.

Have you tried using the pagination feature built into the http request?

Please click into this node and see the pagination configuration. This will return the same thing as shown in your screenshot and automatically increment it for each request.

We also can not see your code in the screenshot so we can’t really help you unless we see what the code block is doing. Either way, I would recommend using the built in pagination feature.

If you’re still having trouble after that please embed your workflow in your next reply instead of using a screenshot

I have tried everything possible under the sun. This is something basic that should work, but it does not. I first started with the pagination. I keep getting a timeout error. I was a bit hesitant to copy and paste the node JSON as it was going to expose my auth code, i could take it out, but i am not sure what else i need to take out before i post it publically. Could i email you directly so that i don’t post this publically

Is not what the error message says actually the case? That you are pulling so much data that n8n crashes?

Maybe set max pages to something low like 5 and see if that works.

I am pretty sure that is not the case. The same happens even when i try 2 pages. It just keeps spinning and spinning. If 500 records are fetched per page then there is only 5 pages in total anyways

We then talk about 2.5k records. No idea how much memory your instance has but depending on that and how much memory your instance has does it still sound reasonable.

I am not sure if this is a memory issue because even if i just put in 2 pages, it does not work. Whenever i hard code the page number, it seems to work really fast, i am using the 20$ hosted plan, if that makes any difference.

Ok, i finally got this to work, not sure what i did differently. I set it to retrieve only three pages, and now it shows returned three items
It is supposed to show 500 per page, and i can not see past the 500, is there a way to jump to the next item? because i can not seem to access the records after 500

So 1 item should contain 0-499, so on and so forth

Hi :wave:t2: still staying to get a response on my last question

Thanks :pray:t2:

Would you be able to share a (simplified) version of your workflow here? That’ll help us understand better what’s happening here.

Dear Bart, it baffles me that something so simple is not achievable on this platform, i don’t think we can solve this via text or email, i would need to send you a video of what i am facing. There is a lot of private info of sdtudets that i don’t want anyone else to see. I really don’t think i can continue paying 20$ a month if something as simple as this can not be solved.