Search code examples
google-apps-scriptgmailgmail-apigoogle-apps

Trigger function upon archive/other action


I'm trying to make a script that will automatically mark any message that has been archived as read upon archiving it. I have found that solutions for this do exist but they are all time based and I want mine to work instantly upon archiving (only checking when it needs to). Is it possible to have an action in Gmail (such as archiving a message) immediately trigger a function in Google Apps Script?

Help is greatly appreciated, thanks!


Solution

  • Is it possible to have an action in Gmail (such as archiving a message) immediately trigger a function in Google Apps Script?

    No.

    Reference