HTTP Request Pagination Response Body formatting

I am hoping this is an easy one for someone. I just cannot figure out the right format.

How do I write the response body in the http request pagination for the link in the response?

{{ $response.body[“next-page”] }}

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:

Hey @davidl,

Looking at that I would say something like {{ $ }} should do it.

Perfect Jon. Thank you.

Here is what the last response looks like. paging is undefined.

The workflow fails when I use the response is empty option. I am guessing that I need to use Received specific status code or Other to stop the request. Here is what the last page looks like.

What would I use to stop the paging? Thanks


I’ll post a working node for others once I have it working property.

Hey @davidl,

It will be like the other hubspot example I posted on the other day here: HTTP Pagination Mode in n8n - #9 by Jon, You would need to use something like {{ !$response.body.paging}}

That did the job. 4000 records pulled in just a few seconds. Thank you.

1 Like

@Jon If the n8n team could add pagination ending examples to the documentation, that would help us all with searching and handling different API’s and pagination :slight_smile: Thanks in advance
Pagination | n8n Docs

Hey @timautomation,

That is not a bad idea.

1 Like

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