Get attachments from a GMAIL folder and upload to G-drive folder

55 views Asked by At

I have a list of gmail folders/labels (of client names) and the corresponding folders in g-drive. These values are the same. e.g. If gmail folder/label is Joe Citizen then the corresponding folder in g-drive is Joe Citizen. What I'm wanting to automate is that when I move an email with Attachments to a gmail folder/label it uploads these attachments to the corresponding folder in g-drive. I have found a template between gmail and gdrive however it takes attachments and pushes it into 1 folder in gdrive. I'm unsure how to create a rule to consider the name of the gmail folder/label and find the corresponding folder in gdrive.

1

There are 1 answers

0
ellaqezi On

That's exactly what the add-on I wrote does! Check out the code: https://github.com/ellaqezi/archiveByLabel

You'll set label to e.g. Joe Citizen and query to label:joe-citizen to archive all attachments of messages labeled Joe Citizen to the same directory on Drive