Problem with Loop - JavaScript heap out of memory

Updated Sharing my first “hard” (working) workflow as a dev - Recursively get all sub-folders from a google drive folder for memory issues.

Feel free to share the workflow (if you are allowed to) if you use the new logic.

I honestly feel pure code implementation would be simpler here, you already are using code nodes. But maybe (like me) you were forced by client requirements to use n8n for the job haha.