Workflow Completed Sucessfully, but didn't finsih the loop

Describe the problem/error/question

When processing a few hundred HTTP request in a loop, the workflow shows the “workflow completed successfully” message, but it hasn’t processed all items in the loop.

What is the error message (if any)?

None, but you can see from the screenshot, it was in the middle of item number 220, but stopped at 219 on a code node..

Please share your workflow

When I try and upload the workflow I get errors..

An error occurred: Body is limited to 32000 characters; you entered 129815.

Share the output returned by the last node

Information on your n8n setup

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

the code node didnt return anything. (probably because you tell it not to in your code)

And therefor the merge node didnt merge anything and the flow stopped. You need to make sure it always returns data in the end to start the next iteration of the loop.
I always put everything inside the loop in a subflow. With the execute workflow node you can set it to always return an item to make sure the loop does not stop.
(next to other benefits of having it in a subflow)

1 Like

I don’t have anything in the JS that says return nothing, at least not that I can see..

edit: I also have the code node set to always output data..

I modified the flow to take the loop into a subflow.. and it worked beautifully.. Thanks!

1 Like

Hi @Myk3

Marking your own solution as the solution while community members gave you the solution really isn’t a nice thing to do.

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