Package google.apps.script.type

Index

AddOnWidgetSet

The widget subset used by an add-on.

Fields
usedWidgets[]

WidgetType

The list of widgets used in an add-on.

WidgetType

The widget type. WIDGET_TYPE_UNSPECIFIED is the basic widget set.

Enums
WIDGET_TYPE_UNSPECIFIED The default widget set.
DATE_PICKER The date picker.
STYLED_BUTTONS Styled buttons include filled buttons and deactivated buttons.
PERSISTENT_FORMS Persistent forms allow persisting form values during actions.
UPDATE_SUBJECT_AND_RECIPIENTS Update the subject and recipients of a draft.
GRID_WIDGET The grid widget.
ADDON_COMPOSE_UI_ACTION A Gmail add-on action that applies to the add-on compose UI.

CommonAddOnManifest

Add-on configuration that is shared across all add-on host applications.

Fields
name

string

Required. The display name of the add-on.

logoUrl

string

Required. The URL for the logo image shown in the add-on toolbar.

layoutProperties

LayoutProperties

Common layout properties for the add-on cards.

addOnWidgetSet

AddOnWidgetSet

The widgets used in the add-on. If this field is not specified, the default set is used.

useLocaleFromApp

bool

Whether to pass locale information from host app.

homepageTrigger

HomepageExtensionPoint

Defines an endpoint that will be executed in any context, in any host. Any cards generated by this function will always be available to the user, but might be eclipsed by contextual content when this add-on declares more targeted triggers.

universalActions[]

UniversalActionExtensionPoint

Defines a list of extension points in the universal action menu which serves as a settings menu for the add-on. The extension point can be a link URL to open or an endpoint to execute as a form submission.

openLinkUrlPrefixes

ListValue

An OpenLink action can only use a URL with an HTTPS, MAILTO or TEL scheme. For HTTPS links, the URL must also match one of the prefixes specified in the allowlist. If the prefix omits the scheme, HTTPS is assumed. HTTP links are automatically rewritten to HTTPS links.

HomepageExtensionPoint

Common format for declaring an add-on's homepage view.

Fields
runFunction

string

Required. The endpoint to execute when this extension point is activated.

enabled

BoolValue

Optional. If set to false, deactivates the homepage view in this context.

Defaults to true if unset.

If an add-on's custom homepage view is disabled, a generic overview card is provided for users instead.

HttpAuthorizationHeader

Authorization header sent in add-on HTTP requests.

Enums
HTTP_AUTHORIZATION_HEADER_UNSPECIFIED Default value, equivalent to SYSTEM_ID_TOKEN.
SYSTEM_ID_TOKEN Send an ID token for the project-specific Google Workspace Add-on's system service account (default).
USER_ID_TOKEN Send an ID token for the end user.
NONE Do not send an Authentication header.

HttpOptions

Options for sending requests to add-on HTTP endpoints.

Fields
authorizationHeader

HttpAuthorizationHeader

Configuration for the token sent in the HTTP Authorization header.

LayoutProperties

Card layout properties shared across all add-on host applications.

Fields
primaryColor

string

The primary color of the add-on. It sets the color of the toolbar. If no primary color is set, the default value provided by the framework is used.

secondaryColor

string

The secondary color of the add-on. It sets the color of buttons. If the primary color is set but no secondary color is set, the secondary color is the same as the primary color. If neither primary color nor secondary color is set, the default value provided by the framework is used.

useNewMaterialDesign

bool

Enables material design for cards.

Common format for declaring a menu item or button that appears within a host app.

Fields
runFunction

string

Required. The endpoint to execute when this extension point is activated.

label

string

Required. User-visible text that describes the action taken by activating this extension point. For example, "Insert invoice."

logoUrl

string

The URL for the logo image shown in the add-on toolbar.

If not set, defaults to the add-on's primary logo URL.

UniversalActionExtensionPoint

Format for declaring a universal action menu item extension point.

Fields
label

string

Required. User-visible text that describes the action taken by activating this extension point, for example, "Add a new contact."

Union field action_type. Required. The action type supported on a universal action menu item. It can either be a link to open or an endpoint to execute. action_type can be only one of the following:
runFunction

string

Endpoint to be run by the UniversalAction.