And i manually run it from postman, each time using the new url from “__next” to crawl the next page if available. It shows that total is around 4 pages. But when port into n8n (with partial nodes below)
it run endless, keep crawling for next page, forcing me to force-stop at page 10th, which isn’t correct. With same param, it’s expected to stop at page 4th.
You can open the debugging window (F12, Console tab) to see what exactly is passed to the service. Are you sure that it sends an empty response after the 4th page?
let me explain how SAP’s successFactor works in pagination. It returns 1000 items/request and response with “__next” when next page available. Subsequent request must use “skiptoken” in previous response (explain in screenshot below)
i compare the run in both postman (col F) and n8n (col B), and surprisingly, the skiptoken are identical for first 4 page (response). Then i substitute skip token to retrieve next page’s result.
If you look closely in cell H6, it no longer return “__next” meaning it’s the last available page. But in n8n, i couldn’t explain why it keep spawning with new skiptoken causing it to keep running till i hit stop button
I use this kind of behavior quite often and didn’t have any issues with pages.
One suggestion - according to postman, on page 4 the response is not empty (it just don’t have the next link property), so that maybe the reason why n8n keeps trying to paginate. You can try setting the end condition manually with this one:
Can you check that the fields $format, $fields, $select, $skipToken occurs only once in the __next property? I’m assuming that they may be added to the URL for the subsequent __next property and thus messing with the API
below are the network log registered. hope it helps for troubleshoot, as clearly stated querystring have provided skiptoken. Hence “_next” shouldn’t in response (as postman example)
bout the inconsistent of results returned in both postman and n8n, sorry barn4k plz accept my apologize .. . i been working wth two diff SF account now only i noticed. Now i gotto sync internally on which account to be use. But i think the respond of “__next” url with longer and longer query param still a bug
updates:
after using SAME credential in both postman/n8n, the result returned are identical, stopped at page 4 yeah! But jz the minor hiccup, where it keep appending fields repetitively which not a show stopper but nice to resolve