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 the editors. Google Workspace add-on manifests
must include all components marked as **Required** if they extend the Editor.

## Editors

The Google Workspace add-on manifest configuration for Editor extensions. See
[Extending Editors with Google Workspace add-ons](https://developers.google.com/workspace/add-ons/editors/gsao)
for details.

| JSON representation |
|---|
| ``` { "homepageTrigger": { object (HomepageTrigger) }, "onFileScopeGrantedTrigger": { object (OnFileScopeGrantedTrigger) }, "linkPreviewTriggers": [ { object (LinkPreviewTriggers) } ], "createActionTriggers": [ { object (CreateActionTriggers) } } ``` |

| Fields ||
|---|---|
| `homepageTrigger` | `object (https://developers.google.com/apps-script/manifest/homepage-trigger)` This trigger function creates the add-on [homepage](https://developers.google.com/workspace/add-ons/concepts/homepages) in the host app. This overrides [`addOns.common.homepageTrigger`](https://developers.google.com/apps-script/manifest/addons#Common.FIELDS.homepageTrigger). |
| `onFileScopeGrantedTrigger` | `object (https://developers.google.com/apps-script/manifest/editor-addons#onfilescopegrantedtrigger)` **Required if the add-on includes behavior specific to the current document** , triggered when the user authorizes the `drive.file` scope. |
| `linkPreviewTriggers[]` | `object (https://developers.google.com/apps-script/manifest/editor-addons#linkpreviewtriggers)` **Required for link previews.** A list of triggers for previewing links in a Google Docs, Sheets, or Slides file. For details, see [Preview links with smart chips](https://developers.google.com/apps-script/add-ons/editors/gsao/preview-links). |
| `createActionTriggers[]` | `object (https://developers.google.com/apps-script/manifest/editor-addons#createactiontriggers)` **Required for third-party resource creation.** A list of triggers for creating resources in a third-party service from the @ menu. For details, see [Create third-party resources with smart chips](https://developers.google.com/apps-script/add-ons/editors/gsao/create-insert-resource-smart-chip). |

### OnFileScopeGrantedTrigger

A configuration for a contextual trigger that fires when the request file scope
dialog uses `CardService.newEditorFileScopeActionResponseBuilder().requestFileScopeForActiveDocument().build();`
and the user grants `drive.file` scope authorization.

| JSON representation |
|---|
| ``` { "runFunction": string } ``` |

| Fields ||
|---|---|
| `runFunction` | `string` The name of the function to run if `drive.file` scope is granted. The function must return an array of [`Card`](https://developers.google.com/apps-script/reference/card-service/card) objects for the UI. |

### LinkPreviewTriggers

The configuration for a trigger that fires when a user types or pastes a link
from a third-party service into a Docs, Sheets, or
Slides file.

To set up this trigger for a Google Workspace add-on, see
[Preview links with smart chips](https://developers.google.com/apps-script/add-ons/editors/gsao/preview-links).

| JSON representation |
|---|
| ``` { "labelText": string, "localizedLabelText": { string: string, ... }, "runFunction": string, "logoUrl": string, "patterns": [ { object(patterns) } ] } ``` |

| Fields ||
|---|---|
| `labelText` | `string` **Required.** The text for an example smart chip prompting users to preview the link, such as `Example: Support case`. This text is static. |
| `localizedLabelText` | `map (key: string, value: string)` Optional. A map of `labelText` to localize into other languages. Format the language in [ISO 639](https://wikipedia.org/wiki/ISO_639_macrolanguage) and country/region in [ISO 3166](https://wikipedia.org/wiki/ISO_3166), separated by a hyphen `-`. |
| `patterns[]` | `object (https://developers.google.com/apps-script/manifest/editor-addons#uripattern)` **Required.** An array of URL patterns that trigger the add-on to preview links. |
| `runFunction` | `string` **Required.** The name of the function to run when the user authorizes the `https://www.googleapis.com/auth/workspace.linkpreview` scope. The function must accept an event object, which includes a `matchedUrl.url` property containing the URL to preview, and return a [`Card`](https://developers.google.com/apps-script/reference/card-service/card) object. |
| `logoUrl` | `string` Optional. The icon displaying in the smart chip and preview card. If omitted, the add-on uses its toolbar icon, [`logoUrl`](https://developers.google.com/apps-script/manifest/addons#Common.FIELDS.logoUrl). |

### UriPattern

The configuration for each URL pattern that triggers a link preview.

| JSON representation |
|---|
| ``` { "hostPattern": string, "pathPrefix" : string } ``` |

| Fields ||
|---|---|
| `hostPattern` | `string` **Required for each URL pattern** . The URL pattern domain. The add-on previews links containing this domain. To match all subdomains, use a wildcard asterisk (`*`). |
| `pathPrefix` | `string` Optional. The path appending the domain. To match all URLs in the domain, leave `pathPrefix` empty. |

### CreateActionTriggers

The configuration for a trigger that fires when a user selects a third-party
integration menu item from the Google Docs @ menu.

To set up this trigger for a Google Workspace add-on, see
[Create third-party resources with smart chips](https://developers.google.com/apps-script/add-ons/editors/gsao/create-insert-resource-smart-chip).

| JSON representation |
|---|
| ``` { "id": string, "labelText": string, "localizedLabelText": { string: string, ... }, "runFunction": string, "logoUrl": string, } ``` |

| Fields ||
|---|---|
| `id` | `string` **Required.** The unique ID for this extension point. Use up to 64 characters in `[a-zA-Z0-9-]+.` format. |
| `labelText` | `string` **Required.** The text appearing in the @ menu, such as `Create support case`. |
| `localizedLabelText` | `map (key: string, value: string)` Optional. A map of `labelText` to localize. Format the language in [ISO 639](https://wikipedia.org/wiki/ISO_639_macrolanguage) and country/region in [ISO 3166](https://wikipedia.org/wiki/ISO_3166), separated by a hyphen `-`. |
| `runFunction` | `string` **Required.** The name of the function to run when a user selects an extension point. The function must return a form card. |
| `logoUrl` | `string` Optional. The icon that displays in the @ menu. If omitted, the add-on uses its toolbar icon, [`logoUrl`](https://developers.google.com/apps-script/manifest/addons#Common.FIELDS.logoUrl). |