The resource configuration used to define
[Google Workspace add-on](https://developers.google.com/workspace/add-ons/concepts/types#g_suite_add-ons)
content and behavior within Gmail. Google Workspace add-on
manifests must include all components marked as **Required** if they extend
Gmail.

> [!NOTE]
> The previous version of add-ons, *Gmail add-ons*, used this resource to define all Gmail add-on behavior. Older fields are deprecated and will be removed; equivalent functionality is now provided within the [add-ons resource](https://developers.google.com/apps-script/manifest/addons). To avoid issues, [upgrade existing add-ons to add-ons.](https://developers.google.com/workspace/add-ons/how-tos/upgrade-addons)

## Gmail

The Google Workspace add-on manifest configuration for
Gmail extensions. See
[Extending Gmail with Google Workspace add-ons](https://developers.google.com/workspace/add-ons/gmail)
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](https://developers.google.com/workspace/add-ons/how-tos/non-google-services#non-google_oauth_configuration_example). |
| `composeTrigger` | `object (https://developers.google.com/apps-script/manifest/gmail-addons#composetrigger)` **Required for compose actions.** Defines the UIs available when composing an email. See [Extending the compose UI with compose actions](https://developers.google.com/workspace/add-ons/gmail/extending-compose-ui) for details. |
| `contextualTriggers[]` | `object (https://developers.google.com/apps-script/manifest/gmail-addons#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. > [!NOTE] > Only one criteria is available (`unconditional`). The array can only define a single trigger. |
| `homepageTrigger` | `object (https://developers.google.com/apps-script/manifest/homepage-trigger)` The trigger function for the add-on [homepage](https://developers.google.com/workspace/add-ons/concepts/homepages) in Gmail. This overrides [`addOns.common.homepageTrigger`](https://developers.google.com/apps-script/manifest/addons#Common.FIELDS.homepageTrigger). |

### ComposeTrigger

The configuration for a compose action. See
[Extending the compose UI](https://developers.google.com/workspace/add-ons/gmail/extending-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](https://developers.google.com/workspace/add-ons/concepts/gsuite-scopes#gmail_add-on_scopes). |
| `selectActions[]` | `object (https://developers.google.com/apps-script/manifest/gmail-addons#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](https://developers.google.com/workspace/add-ons/gmail/extending-message-ui)
for details.

> [!NOTE]
> The only criteria is `unconditional`, meaning the trigger fires for every opened message.

| 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. |