I have a scenario that receives emails. It will add a row to a google sheet using data found in the email body, create a folder using the email’s subject as the filename, then take the two attachments and upload them to the created folder. Let’s call that the main branch.
It will also check if a folder of the same name already exists. If such a folder is found, it will fork to a branch that skips the folder creation and uploads to the existing folder. Let’s call this the 2nd branch.
In the case of the 2nd branch, I want to delete the old contents of the folder before uploading the new attachments. This is to save file storage space. I can’t figure out how to do it, and I’m hoping someone can help.
I managed to make a version of the scenario that deletes the folder and recreates it before uploading, but this will pose problems in the long run.