Loop URL from page 1 to end

Hello N8n Community,

I have problem when crawl data invoice from website. Because the website just reponse 300 invoice / 1 time i call GET method (HTTP Request).

But totalPage i get ex: 100 page. How I can loop this url from 1 to 100 page?

https://vinvoice.viettel.vn/api/cluster7/services/einvoiceapplication/api/invoice/search?page={{ pageNum }}&size=10&createdDate.greaterThanOrEqual={{ $now.setZone(‘UTC’).toFormat(‘yyyy-MM-dd’) }}{{ encodeURIComponent(“T00:00:00.000Z”)}}&createdDate.lessThanOrEqual={{ $now.setZone(‘UTC’).toFormat(‘yyyy-MM-dd’) }}{{ encodeURIComponent(“T”+ $now.setZone(‘UTC’).toFormat(‘hh:mm:ss.SSS’)+“Z” )}}&supplierId.equals=88877&dateType.equals=0&invoiceStatus.equals=1&sort=issueDate%2Cdesc&sort=invoiceNumber%2Cdesc

Information on your n8n setup

  • n8n version: 1.50.1
  • Database: SQLite
  • n8n EXECUTIONS_PROCESS setting: own
  • Running n8n via Docker
  • Operating system: NAS

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:

Hi @giahuylpu

You should be able to use the Pagination option of the HTTP Request node for this (use with the queries page and size)

1 Like

Thanks Ria so much.

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