Workflow
AI Workflows

What to Check When the n8n API Returns the Same Pagination Cursor

Dec 02, 2026|
AL
Automation Lab

Trace a repeated n8n API cursor by comparing outgoing requests, returned record IDs and bounded stop conditions.

If the n8n API returns the same pagination cursor twice, compare the cursor actually sent with the cursor returned, then compare the workflow IDs on both pages. Stop the loop if the cursor repeats. Keep the pages you received for inspection and mark the result incomplete until you can verify that the final page was reached.

Trace the requests before changing your workflow

  1. **Start with a small read-only request.** Fetch the first page of the public workflows endpoint with a small limit, such as two records. Leave the cursor out on that first request. Record the HTTP status, the IDs in the response and the returned `nextCursor`. Keep the endpoint, filters and limit stable for the rest of the check. Keep credentials out of screenshots and diagnostic notes.
  2. **Check the request that actually went out.** On the next request, pass the previous response’s `nextCursor` as the `cursor` query parameter. Treat the token as opaque and let the HTTP client encode it. In a workflow, confirm that the expression reads the immediately preceding response. If your HTTP node includes status and headers, inspect the output structure to see where the JSON body sits before selecting the cursor field.
  3. **Compare IDs across pages.** An identical or overlapping set of IDs warrants a closer look at request parameters and source changes. If IDs change but the cursor repeats, record both observations. Distinct IDs tell you that the data changed, but they cannot establish that the listing is complete or that replaying the cursor will advance again.
  4. **Bound the loop and preserve evidence.** Stop on the documented end-of-list response, a repeated cursor, or a page limit you set for diagnosis. Keep termination reasons distinct. A repeated cursor or a page limit should flag a partial run. Deduplicate records by workflow ID before any downstream write, and preserve the request count and IDs to help troubleshoot missing data.

Fictional example: listing workflows for an audit

A first request returns workflow IDs 12 and 19 with a cursor we’ll call A. The next request sends A and returns IDs 24 and 30, but its next cursor is still A. The audit keeps all four IDs and flags the export as partial. The maintainer checks the actual outgoing query, reruns the two requests with a plain HTTP client, and records whether the same pattern appears outside the workflow. No inventory rows are removed on the basis of that partial result.

Questions people ask

Should I decode or increment the cursor myself?

No. Pass along the value returned by the API. If the token repeats, save a redacted request and response trace and stop the diagnostic loop. Guessing an offset can skip records and make it harder to compare your client with the documented request.

Does a repeated cursor mean the n8n API is broken?

One community report describes changing data alongside a repeated cursor. It gives you a useful comparison case. Check your endpoint, deployed n8n version and the actual query sent first. On Cloud and self-hosted installations, use the API base URL documented for your instance.

Is deduplicating the workflow IDs enough?

Deduplication can prevent a duplicate row in your destination. It cannot recover pages you never saw. Track both the IDs collected and the reason pagination stopped. This distinction matters if another workflow treats the inventory as complete and removes records missing from it.

Sources

Keep exploring

Find practical AI assets for your next task

Browse curated collections and ready-to-use AI assets for marketing, sales, project delivery and other goals.