Property of type `resourceLocator` not respecting pagination when search is disabled

Describe the problem/error/question

We at superchat.com are tying to implement a custom node based on out API.

Our custom node has a property of type resourceLocator with search disabled. The function for populating the list returns a paginationToken. Unfortunately it seems the list never loads new elements when being rendered.

When I enable search, it does request populate pages as I type.

Information on your n8n setup

  • n8n version: 1.93.0
  • Database (default: SQLite): ?
  • n8n EXECUTIONS_PROCESS setting (default: own, main): ?
  • Running n8n via (Docker, npm, n8n cloud, desktop app): npm
  • Operating system: MacOS 14.5

Hi @superchat_ben,

Discussing with @Jon we believe pagination should work even without search enabled, since with search, n8n still fetches the full result set and filters after.

Most likely, the issue is in the node’s listSearch implementation not handling or returning the paginationToken properly when search is off.

Hope that helps point you in the right direction!

Hi @Shireen,

Thanks for the quick reply. I double checked our listSearch implementation and I do not think it’s faulty. To me it looks like the n8n environment is not calling it properly in the first place.

Here is our implementation of the search function: n8n-nodes-superchat/src/nodes/Superchat/methods/userSearch.ts at main · super-chat/n8n-nodes-superchat · GitHub

I modified the function, adding a statement logging the pagination token from the function arguments and one logging the value of res.pagination.next_cursor which is returned as the paginationToken in the output object. I also modified the API request to have a page of 5 to force the use of pagination.

Here is a screen recording of me trying the node:

During the screen recording n8n will log the following output:

input paginationToken undefined
output paginationToken us_ForoP3z9WfPZx5DMi42Yp

When opening the list for the first time, the input pagination is undefined which is expected. This first request then returns us_ForoP3z9WfPZx5DMi42Yp as the next pagination token, but the function is never called with this token.
This leads me to conclude that either, I am providing the output paginationToken in the wrong way or n8n fails to call the function even though the output is provided correctly. Since our functions return value matches the INodeListSearchResult type definition I suspect it’s the latter.

I would highly appreciate any tips on how to resolve this issue as it’s one of the last ones blocking us from publishing our custom node.