Gmail manifest resource

  • The Gmail manifest defines the content and behavior of a Google Workspace add-on within Gmail and requires all components marked as Required if extending Gmail.

  • Older Gmail add-on manifest fields are deprecated, and existing Gmail add-ons should be upgraded to Google Workspace add-ons.

  • The Gmail manifest includes configurations for compose actions via composeTrigger and triggers that fire when messages are opened via contextualTriggers.

  • ContextualTriggers currently only support an unconditional criteria, meaning they fire for every opened Gmail message.

  • SelectActions define the function to run when a compose action is selected and are limited to a single action per add-on.

The resource configuration used to define Google Workspace add-on content and behavior within Gmail. Google Workspace add-on manifests must include all components marked as Required if they extend Gmail.

Gmail

The Google Workspace add-on manifest configuration for Gmail extensions. See Extending Gmail with Google Workspace add-ons for details.

JSON representation
{
  "authorizationCheckFunction": string,
  "composeTrigger": {
    object (ComposeTrigger)
  },
  "contextualTriggers": [
    {
      object (ContextualTrigger)
    }
  ],
  "homepageTrigger": {
    object (HomepageTrigger)
  }
}
Fields
authorizationCheckFunction

string

Deprecated. The name of a Apps Script function performing third-party authorization checks.

This function is deprecated. Instead, the add-on should throw an exception from the main invocation, as shown in the Non-Google OAuth configuration example.

composeTrigger

object (ComposeTrigger)

Required for compose actions. Defines the UIs available when composing an email.

See Extending the compose UI with compose actions for details.

contextualTriggers[]

object (ContextualTrigger)

Required. A list of triggers that fire when a message opens in Gmail. Triggers execute a specific Apps Script function to update the UI.
homepageTrigger

object (HomepageTrigger)

The trigger function for the add-on homepage in Gmail. This overrides addOns.common.homepageTrigger.

ComposeTrigger

The configuration for a compose action. See Extending the compose UI for details.

JSON representation
{
  "draftAccess": string,
  "selectActions": [
    {
      object (SelectAction)
    }
  ]
}
Fields
draftAccess

string

Defines the data access level for a compose trigger function. Valid options include:

  • NONE (default): The event object is mostly empty.
  • METADATA: The event object includes recipient lists. This requires the gmail.addons.current.message.metadata scope.
selectActions[]

object (SelectAction)

A list of compose actions. The list is limited to a single action per add-on. The compose action has an icon in the Gmail window, specified by gmail.logoUrl.

ContextualTrigger

The configuration for a trigger that fires when a user opens a Gmail message. See Extending the message UI for details.

JSON representation
{
  "onTriggerFunction": string,
  "unconditional": {},
}
Fields
onTriggerFunction

string

Required for each contextual trigger. The name of the Apps Script function that executes when the trigger fires.
unconditional

object

Required for each contextual trigger. Specifies that the trigger activates for all opened Gmail messages. This should always be an empty object.

SelectAction

The compose action configuration defining the function to run when selected.

JSON representation
{
  "runFunction": string,
  "text": string
}
Fields
runFunction

string

Required for compose actions. The name of the Apps Script function that executes when selected. The function builds the add-on compose UI.
text

string

Required for compose actions. A short description of the action.