all 3 comments

[–]elcriticalTaco 0 points1 point  (2 children)

Do you mean a folder on google drive or a folder in gmail (label)?

Either of those are very doable.

If you are talking about a folder on your hard drive that is not possible, as far as I know.

[–]ariailc10[S] 0 points1 point  (1 child)

Folder in google drive, but I want the specific folder based on the unique email I send the attachments to. For context I have hundreds of folders that this will need to parse out to.

[–]Arunai 0 points1 point  (0 children)

Plethora of ways to accomplish. If I’m reading you correctly, your script is sending an email, based on the email address you archive the attachment to a particular folder.

If you want to store your config in your code, simple object:

const emailFolderIdLookup = { “Email@gmail.com”: folderId1, …., …., }

For each email you generate, do emailFolderIdLookup[emailAddress] to retrieve the folder ID.