I just started the video and this is great! Almost exactly what I’m looking for however I want to archive ALL incoming emails with a specified label as they come in. I cannot achieve this with regular rules because there is not a static trigger that would determine which emails are labeled. My team labels with their name as emails come in to denote which member is working on which thread. We would like to keep the inbox clear once an email is labeled. I’m going to watch through and learn but if anyone has tips for me I’d love to hear them!
As far as I know, there is no way to run this archiving script when you add a label to a message. You would probably have to use a time based trigger: developers.google.com/apps-script/guides/triggers#available_types_of_triggers
Everything in Gmail uses up storage. So yes, if you archive messages they count towards your storage. To unarchive messages you probably could move them to inbox: developers.google.com/apps-script/reference/gmail/gmail-thread#movetoinbox
There might be a way to access the inbox of a delegated mailbox if you are using a Google Workspace account. See this Stackoverflow page for more information: stackoverflow.com/questions/40855997/using-google-apps-script-api-to-access-another-user
Hi Chanel thanks a lot for the great work unfortunately i got an error as below Error ReferenceError: thred is not defined (anonymous) @ Code.gs:4 archiveThreads @ Code.gs:3 any idea how to fix that ?