My workflow stops after different number of iterations and don't know why

Hello!

I’m just getting started with n8n and this is my first workflow.

The project is about migrating Hubspot Engagements from one account to another.

The hubspot engagement object has an association array with its relationships.

also the engagement object has an ownerId.

So first i tried with the default Hubspot node to get all engagements but that crashed when trying to get all because of api limit. So i did a loop instead with the http request node instead and check if the property “hasMore” is equal to true in the if node. If so the loop should continue until all the data has been fetched. And this seems to work.

Then i also have two flows that only gets triggered once and that is fetching all the data i need for mapping these ID’s.

And this workflow seems to work fine until like 6th or 7th iteration and then it stops at different nodes like the If2 node that only checks again if the object has more items or not. So it can get stuck on that node even though it’s just a boolean check, and then the next times it get stucks at the code node instead.

I have no idea what’s going wrong and have trouble finding any info regarding the Errors either so i would appreciate some help.

Apparantely i can’t paste all my code because the body is too long it says? But this is the most important parts and where it’s failing.

It looks like your topic is missing some important information. Could you provide the following if applicable.

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