I am so lost with the loop

Hello there,

I need help, since I am new to n8n and want to do something that is way above my understanding at the moment. I have a list of user ID’s and I wan’t to delete their files.

I have the user Id’s in the google sheet. For each user Id I need to call a HTTTP Request to the Rest API to get the user files. Each file then has his own Id.

To delete the files I need to use for example: v1/api/user/{userId}/document/{documentId}

I managed to build something with the help of AI and it kinda works.

So the Code node then attaches the user Id to the file Id. The problem is, it only works for one document of that user. I have a lot of users and a lot more of files and I don’t know how to lopp or batch this. And when the files from a user are deleted, it doesn’t skip to the next user. I need to delete the users Id in the google sheet.

I did it on my own with the help of AI for the Code node.
It may not be professional, but it works and I am proud of it :smiley: