3

We need to develop the gmail addon to read the checked mail messages and process the content.We are using the below application json:

{
 "oauthScopes": [
 "https://www.googleapis.com/auth/gmail.addons.execute",
 "https://www.googleapis.com/auth/gmail.readonly"
],
"gmail": {
 "name": "My Addon",
 "logoUrl": "https://www.gstatic.com/images/icons/material/system/2x/bookmar     k_black_24dp.png",
 "contextualTriggers": [{
  "unconditional": {},
  "onTriggerFunction": "buildAddOn"
  }],
  "primaryColor": "#4285F4",
  "secondaryColor": "#4285F4"
 }
 }

We have tried above json to load the gmail addon without opening message.

How to fix the error we get:

Open an Email Select an email for My Gmail Add-on to recommend content for you.

Roman Pokrovskij
  • 9,449
  • 21
  • 87
  • 142
GVW
  • 31
  • 2

3 Answers3

3

Unfortunately Gmail Add-on can not be triggered unless you open an email. we are also looking for the same feature as it is very critical for our use case. There is an ongoing thread for the people that are looking for this feature, please add your comments to the thread for getting more weightage on it.

https://issuetracker.google.com/issues/111312904

https://issuetracker.google.com/issues/116537906

RAPTOR3
  • 81
  • 7
1

This feature will be available in the upcoming G Suite add-ons framework

https://gsuiteupdates.googleblog.com/2019/04/gsuite-add-ons-beta.html

RAPTOR3
  • 81
  • 7
1

This feature has been rolled out. You can now use a homepage trigger to open your addon even when the user is not viewing an email. Check out the docs here.

To use a homepage trigger, just add this to your manifest file:

 {
  // ...
  "addOns": {
    // ...
    "common": {
      // ...
      "homepageTrigger": {
        "runFunction": "myFunction",
        "enabled": true
      }
    }
  }
}