Index
ComposeTrigger
(message)ComposeTrigger.DraftAccess
(enum)ContextualTrigger
(message)GmailAddOnManifest
(message)UnconditionalTrigger
(message)UniversalAction
(message)
ComposeTrigger
A trigger that activates when user is composing an email.
Fields | |
---|---|
actions[] |
Defines the set of actions for a compose time add-on. These are actions that users can trigger on a compose time add-on. |
draft |
Defines the level of data access when a compose time add-on is triggered. |
DraftAccess
An enum that defines the level of data access the compose trigger requires.
Enums | |
---|---|
UNSPECIFIED |
Default value when nothing is set for draftAccess. |
NONE |
The compose trigger can't access any data of the draft when a compose add-on is triggered. |
METADATA |
Gives the compose trigger the permission to access the metadata of the draft when a compose add-on is triggered. This includes the audience list, such as the To and Cc list of a draft message. |
ContextualTrigger
Defines a trigger that fires when the open email meets a specific criteria. When the trigger fires, it executes a specific endpoint, usually in order to create new cards and update the UI.
Fields | |
---|---|
on |
Required. The name of the endpoint to call when a message matches the trigger. |
Union field trigger . The type of trigger determines the conditions Gmail uses to show the add-on. trigger can be only one of the following: |
|
unconditional |
Unconditional triggers are executed when any mail message is opened. |
GmailAddOnManifest
Properties customizing the appearance and execution of a Gmail add-on.
Fields | |
---|---|
homepage |
Defines an endpoint that will be executed in contexts that don't match a declared contextual trigger. Any cards generated by this function will always be available to the user, but may be eclipsed by contextual content when this add-on declares more targeted triggers. If present, this overrides the configuration from |
contextual |
Defines the set of conditions that trigger the add-on. |
universal |
Defines a set of universal actions for the add-on. The user triggers universal actions from the add-on toolbar menu. |
compose |
Defines the compose time trigger for a compose time add-on. This is the trigger that causes an add-on to take action when the user is composing an email. All compose time add-ons must have the |
authorization |
The name of an endpoint that verifies that the add-on has all the required third-party authorizations, by probing the third-party APIs. If the probe fails, the function should throw an exception to initiate the authorization flow. This function is called before each invocation of the add-on in order to ensure a smooth user experience. |
UnconditionalTrigger
This type has no fields.
A trigger that fires when any email message is opened.
UniversalAction
An action that is always available in the add-on toolbar menu regardless of message context.
Fields | |
---|---|
text |
Required. User-visible text describing the action, for example, "Add a new contact." |
Union field action_type . The type of the action determines the behavior of Gmail when the user invokes the action. action_type can be only one of the following: |
|
open |
A link that is opened by Gmail when the user triggers the action. |
run |
An endpoint that is called when the user triggers the action. See the universal actions guide for details. |