How Can I Ensure All Paginated Items Are Merged in n8n?

Hello,I’m really struggling to find a solution to my problem with a workflow that is, in theory, quite simple and I’m reaching out for help to know where I should turn. To explain briefly: I retrieve data from Baserow, and for a list of product orders, I’ve implemented a pagination system to fetch all rows from my Baserow table.

To make sure I wait for all the data from the loop, I added a second IF node that activates a merge only when next = null. Despite that, the number of items does not arrive at the merge simultaneously there’s a very short delay (less than a second).

Even though the IF node triggers correctly when next = null, the number of items visible on the branch right after shows, for example, 98 at first, and then +19 items appear just after to complete the total (128).

However, I still end up with an incomplete result, because the second run with the 19 “late” items is always ignored — it just outputs:

[

{}

]

I’ve exhausted all my options and I don’t want to give up. Could you please tell me what I can do, or give me any advice — or let me know where I can find proper support or someone whose job it is to help with n8n usage?

I’m willing to do whatever it takes to get out of this never-ending stagnation.

Thank you so much :folded_hands: => https://i.imgur.com/nITfiMU.png

hello @david6

The HTTP Request node has a built-in pagination mode.

Another option is to use a sub-workflow and move the loop functionality there. So the Execute Workflow node will return all items to the parent workflow

  1. Mark the end of each branch with a Set.
    At the end of each branch (paging, fetching, processing), add a Set or Code node to set a control variable.

  2. Use a Merge (Wait) to join all these markers.
    This Merge must be configured as a “Wait for All Inputs” type (“Pass-through” or “Merge by Index” mode won’t work here).

  3. After the Merge, place a Switch.
    This node will validate that all branches have completed, checking if you have all the expected markers (done1, done2, etc.).

  4. Only after the Switch do you continue with the actual Merge of the data.
    This is where you can safely use Merge (Append).

R1 → [Proceso] → Set: { branch: “done1” }
> MergeWait → Switch → MergeData → Final
R2 → [Proceso] → Set: { branch: “done2” } /