Google drive creating folders and uploading attachments from email

Hi,
My workflow is for categorising competitor’s music. It fetches the music attachment_0, className, showName, and competitorName from an email and searches/creates folders in the google drive and uploads the music file like so showName > className > attachment (named competitorName.mp3). The problem is some competitor’s have 2 classes so I need it to create 2 class folders inside the showName parent folder and upload the same attachment into both folders. I have it working apart from it’s only creating 1 class folder instead of 2 and it’s uploading 3 attachments into the folder instead of the 2 intended. I’ve been at this for days and I’ve tried multiple solutions. Any help would be appreciated massively!
Thank you in advance.

Hey,

For the folder creation, do you ensure that there is 2 items going through the create drive folder ?
And for the upload, I think the problem might come from your last merge node, but without pinned datas, can’t really verify this !

Hope this helps ! :slight_smile:

Hi thanks for the reply,
The last merge node is working fine as I can acheive what I need with 1 classname submitted. As soon as 2 classnames are submitted in the email I have issues so I’ve changed the code to accomodate.

The Code2 node is outputting 1 item like so:

[

{

"searchOutput": "1N2dInWeZ33y4qIEQBWlpyyPMfZm9BwvK",

"className": "Women's Figure Over 50"

},

{

"searchOutput": "1N2dInWeZ33y4qIEQBWlpyyPMfZm9BwvK",

"className": "Women's Bodybuilding"

}

]

and the second item empty so therefore the Search Drive for Class Name isn’t processing the second item. I need it to separate the items like so:

item 1:

[

{

"searchOutput": "1N2dInWeZ33y4qIEQBWlpyyPMfZm9BwvK",

"className": "Women's Figure Over 50"

}
]

item2:

[
{

"searchOutput": "1N2dInWeZ33y4qIEQBWlpyyPMfZm9BwvK",

"className": "Women's Bodybuilding"

}
]

but no matter anything I try it just isn’t having it. I’ve been working with ai for the past 3 days and cannot get it to work for 2+ classes.

I have SET node outputting 2 items but Search Drive for Class Name isn’t processing them even though it shows the 2 items as desired inside the expression boxes (Search query and parent folder)

hey, did you figure it out? i have the same problem…i was able to create folder but i cant move the file to the folder that i was created…

Hey, I didn’t unfortunately. I can get 1 folder working and attachment uploaded though. If you copy and paste my workflow into a new project it should work for you or if you want to share yours I can see where you’re going wrong.

I have almost the same one I use it for invoices, so I used also reg agent, he make the new folder but it’s not add the file to the folder🫤 I also put wait node so the folder will be few seconds before but still the same…I keep looking for a solution…

i was make it…you can use this one. just put any triger that you want.