Code node in "Execute Once" mode only outputs first item from array

Hello,
I am running a self-hosted n8n instance, version 1.107.3.
I have a Code node set to Execute Once: ON. It receives a list of 50 items. The code inside is return items.slice(0, 20);.
I expect the node to output 20 items, but it is only outputting the first item from the sliced list. Can you please help me diagnose why it is not returning the full array of 20 items?

Describe the problem/error/question

What is the error message (if any)?

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

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

Hey @Matthew_Broadbent hope all is good. Welcome to the community.

Would you like to upload a workflow that illustrates your issue? That could help and speed up the process.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.