I’m using the HTTP Request node with built-in pagination (Response Contains Next URL) to fetch contacts from the GoHighLevel API. My setup:
Pagination mode: Response Contains Next URL
Next URL: {{ $response.body.meta.nextPageUrl || ‘’ }}
Complete when: {{ !$response.body.meta.nextPageUrl }}
Page limit: 100 pages, limit=50 per page
Interval between requests: 1000ms
Timeout: 60000ms
Retry on fail: 3 tries, 5000ms wait
The problem: on larger contact lists (3000-4000 contacts), GHL’s API returns “Request Timeout after 30000ms” on a random page mid-pagination. When this happens n8n stops the entire node and only sends to the contacts it already fetched — so instead of 3500 contacts I might only get 300-600.
The timeout is GHL’s server-side 30s limit, not mine. Retry on fail doesn’t seem to apply per-page during pagination — it only retries the whole node from scratch.
Questions:
Does Retry on Fail actually retry individual failed pages during pagination, or does it restart the whole pagination from page 1?
Is there a way to make pagination resume from where it left off after a timeout?
Would a Loop/Split in Batches approach using the startAfter and startAfterId cursor parameters be more reliable than built-in pagination for this use case?
Any other approaches to make large GHL contact fetches reliable?
Running n8n v2.27.4 self-hosted on DigitalOcean.
What is the error message (if any)?
Please share your workflow
(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)
Hi @Maria_Loreto
I think so retry on fail reruns the whole node from page 1, it can’t resume from the page that timed out, and the contacts already fetched are dropped when it fails. The reliable fix is to stop using built-in pagination and page manually, so each page is its own request and Retry on Fail applies per page.
Turn Pagination off on the HTTP Request node and build a loop:
HTTP Request fetches a single page, taking the cursor from the previous response as query params:
On that node, Settings > Retry on Fail (3 tries, 5000ms). A timed-out page now retries on its own instead of restarting the whole run.
Push each page’s contacts to your DB / Sheet / data store right after the request, so pages are saved as you go and a mid-run failure loses nothing.
Add a Wait node (1000ms) to keep your interval, then an IF node checking {{ !!$json.meta.nextPageUrl }}: true loops back into the HTTP Request node, false ends.
Each page stays independently retryable and earlier pages survive a timeout, which built-in pagination can’t give you. Let me know how this goes.
The “Request Timeout after 30000ms” in similar cases often doesn’t come from a single request, but from the built-in pagination in the HTTP Request node running the entire fetch (all pages combined) against a time limit instead of clocking each page individually. With 3000-4000 contacts and limit=50, that’s ~60-80 requests in one continuous node run — it adds up, even if each individual GHL response stays under 30s on its own.
Two approaches that have helped in similar setups:
Set a smaller limit (e.g., 20 instead of 50). Smaller pages are usually answered noticeably faster by the GHL API, especially at deeper offsets in large lists.
Bypass the built-in pagination and instead use Loop Over Items (SplitInBatches) + a separate HTTP Request per page, where the nextPageUrl from the previous response is explicitly passed on. This gives you its own timeout/own error handling per page instead of a shared limit for the entire fetch — and if a single page fails, you can specifically retry just that one page instead of restarting the entire run.
If you’re using the v2-Contacts API: GHL now also has a cursor-based Search endpoint there, which tends to run more stably on large lists than classic nextPageUrl pagination — if you haven’t tried it yet, might be worth a look.
For a long contact import, I would avoid making the whole pagination run one HTTP Request execution. Fetch one page per request, pass startAfter and startAfterId from the previous response, apply retry and timeout on that request, persist each page immediately, then loop while nextPageUrl or the cursor is present. A smaller page size can also reduce slow deep-page responses. This lets a failed page be retried without discarding pages that were already stored.
You’re right .. the issue is with how n8n’s built-in pagination handles retries.
Retry on Fail doesn’t retry just the failed page. If, for example, page 42 times out, n8n starts the whole request again from page 1. That’s why you’re only getting 300–600 contacts instead of all ~3,500.
The more reliable approach is to disable built-in pagination and handle it manually with a loop:
Fetch one page at a time using GHL’s startAfter and startAfterId cursors.
Use a smaller limit, like 20, to reduce timeouts.
Enable Retry on Fail on the HTTP Request — now only the failed page gets retried.
Save each page immediately after it’s fetched, so completed pages aren’t lost.
Loop until there are no more pages.
You can also use n8n’s Loop Over Items (Split in Batches) for the same approach.
The key benefit is that if page 42 fails, you don’t lose pages 1–41.
It’s a little more setup, but for larger GHL contact lists, this is much more reliable than relying on n8n’s built-in pagination.