How do I access the done output on the Splitting In Batches node in javascript?

I wan to access the ‘done output’ of the Splitting In Batches node using javascript in the n8n Code node?

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:

Hi @fdavidg :wave: I’m not too sure exactly what you’re trying to do as you didn’t share your workflow, but you should be able to do this by adding the code node after the “done” branch of the Split in Batches node, and ensuring that you pick the “Done Branch”. That should show you all the data the Split in Batches node has processed.

That would look like this:

The code node at the end of this workflow isn’t doing anything, but you if you take a peek at it, you should see that it can access the Done branch like in the screenshot above.

Let me know if that helps!

1 Like