Handle pagination in HTTP requests
Needs changesNeeds changes. This template uses 1 thing(s) that n8n 3.0 removes: Function (legacy). 1 breaking item(s) found. Static check, last run 2026-10-19.
What this workflow does
This workflow has 8 nodes and runs manually, when you click “Execute workflow”. It uses only n8n's built-in nodes.
How it runs
Trigger: Manually, when you click “Execute workflow”.
- Config URL (Function): runs custom JavaScript (legacy Function node)
- HTTP Request: calls an HTTP API
- Wait (Function): runs custom JavaScript (legacy Function node)
- Check if pagination? (If): checks a condition and branches into true / false
- Set next URL (Edit Fields (Set)): sets or maps fields
- Combine all data (Function): runs custom JavaScript (legacy Function node)
Before you upgrade to n8n 3.0
1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:
- Function (legacy) in Wait, Config URL, Combine all data: replace with Code node, mode 'Run Once for All Items'.
Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).
| Removed in 3.0 | Replace with |
|---|---|
| Function (legacy) Wait, Config URL, Combine all data | Code node, mode 'Run Once for All Items' |
Nodes used (6)
- Manual Trigger
n8n-nodes-base.manualTrigger - HTTP Request
n8n-nodes-base.httpRequest - No Operation, do nothing
n8n-nodes-base.noOp - Function
n8n-nodes-base.function - If
n8n-nodes-base.if - Edit Fields (Set)
n8n-nodes-base.set
From the author
This example workflow demonstrates how to handle pagination. This example assumes that the API you are making the request to has pagination, and returns a cursor (something that points to the next page). This example workflow makes a request to the HubSpot…