问题
I'm programming a gmail addon and it loads as an option for some messages, not for all messages. Ironically, it's not loading for the specific messages I want to use the addon for.
I have the following in the 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/bookmark_black_24dp.png",
"contextualTriggers": [{
"unconditional": {},
"onTriggerFunction": "buildAddOn"
}],
"primaryColor": "#4285F4",
"secondaryColor": "#4285F4"
}
}
Gmail addon documentation says that "unconditional" is the only value for contextual triggers, meaning that the addon should open for each and every message. Any ideas why it would not load for some?
As background, the addon will be used to plug event information from an automatically generated email (generated by my org's room reservation system) into a form to add it to appropriate Google Calendars. I can't think of anything about the message itself that would make the addon unavailable, especially since the addon supposedly has no choice but to run for all messages.
EDIT: Oddly enough, it works if I forward the auto message to myself; then the addon will load.
回答1:
This happens when Google doesn't recognize the sender of the email. On the emails that do not load the Add-On notice that instead of showing the contacts picture or their initials it will show a ?.
This has been reported here https://issuetracker.google.com/issues/112064778
来源:https://stackoverflow.com/questions/52107934/gmail-addon-not-loading-for-all-messages