<- Blog

Read all LarkBase data with n8n pagination

How to process has_more and page_token safely when reading every LarkBase record.


TL;DR: LarkBase returns records in pages. Continue while has_more is true, pass the returned page_token, and protect the workflow from missing or repeated tokens.

The response contract

A response contains the current records, a has_more flag and, when more data exists, a page_token. A workflow that reads only the first response silently misses records once the table grows beyond one page.

In n8n, configure the request with a positive page_size, store the token from the previous response, and stop when has_more becomes false. Set a maximum page count and detect a repeated token to prevent an accidental infinite loop.

Make processing replayable

Process and count each page, use a stable business key for downstream writes, and batch updates where the API permits. A failed page should be identifiable without reprocessing the entire dataset blindly.

Before production

Test an empty table, one page, multiple pages, the last page, a transient failure and a duplicate execution. Reconcile requested pages with processed records and define an owner for retries and recovery.

Read all LarkBase data with n8n pagination | Diginno Blog