- Resource: Deployment
- AddOns
- CommonAddOnManifest
- LayoutProperties
- AddOnWidgetSet
- WidgetType
- HomepageExtensionPoint
- UniversalActionExtensionPoint
- GmailAddOnManifest
- ContextualTrigger
- UnconditionalTrigger
- UniversalAction
- ComposeTrigger
- MenuItemExtensionPoint
- DraftAccess
- DriveAddOnManifest
- DriveExtensionPoint
- CalendarAddOnManifest
- ConferenceSolution
- CalendarExtensionPoint
- EventAccess
- DocsAddOnManifest
- DocsExtensionPoint
- LinkPreviewExtensionPoint
- UriPattern
- CreateActionExtensionPoint
- SheetsAddOnManifest
- SheetsExtensionPoint
- SlidesAddOnManifest
- SlidesExtensionPoint
- HttpOptions
- HttpAuthorizationHeader
- Methods
Resource: Deployment
A Google Workspace Add-on deployment
JSON representation |
---|
{
"name": string,
"oauthScopes": [
string
],
"addOns": {
object ( |
Fields | |
---|---|
name |
The deployment resource name. Example: |
oauth |
The list of Google OAuth scopes for which to request consent from the end user before executing an add-on endpoint. |
add |
The Google Workspace Add-on configuration. |
etag |
This value is computed by the server based on the version of the deployment in storage, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. |
AddOns
A Google Workspace Add-on configuration.
JSON representation |
---|
{ "common": { object ( |
Fields | |
---|---|
common |
Configuration that is common across all Google Workspace Add-ons. |
gmail |
Gmail add-on configuration. |
drive |
Drive add-on configuration. |
calendar |
Calendar add-on configuration. |
docs |
Docs add-on configuration. |
sheets |
Sheets add-on configuration. |
slides |
Slides add-on configuration. |
http |
Options for sending requests to add-on HTTP endpoints |
CommonAddOnManifest
Add-on configuration that is shared across all add-on host applications.
JSON representation |
---|
{ "name": string, "logoUrl": string, "layoutProperties": { object ( |
Fields | |
---|---|
name |
Required. The display name of the add-on. |
logo |
Required. The URL for the logo image shown in the add-on toolbar. |
layout |
Common layout properties for the add-on cards. |
add |
The widgets used in the add-on. If this field is not specified, the default set is used. |
use |
Whether to pass locale information from host app. |
homepage |
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. |
universal |
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. |
open |
An OpenLink action can only use a URL with an |
LayoutProperties
Card layout properties shared across all add-on host applications.
JSON representation |
---|
{ "primaryColor": string, "secondaryColor": string, "useNewMaterialDesign": boolean } |
Fields | |
---|---|
primary |
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. |
secondary |
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. |
use |
Enables material design for cards. |
AddOnWidgetSet
The widget subset used by an add-on.
JSON representation |
---|
{
"usedWidgets": [
enum ( |
Fields | |
---|---|
used |
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. |
FIXED_FOOTER |
Fixed footer in a card. |
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. |
HomepageExtensionPoint
Common format for declaring an add-on's homepage view.
JSON representation |
---|
{ "runFunction": string, "enabled": boolean } |
Fields | |
---|---|
run |
Required. The endpoint to execute when this extension point is activated. |
enabled |
Optional. If set to Defaults to If an add-on's custom homepage view is disabled, a generic overview card is provided for users instead. |
UniversalActionExtensionPoint
Format for declaring a universal action menu item extension point.
JSON representation |
---|
{ "label": string, // Union field |
Fields | |
---|---|
label |
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: |
|
open |
URL to be opened by the UniversalAction. |
run |
Endpoint to be run by the UniversalAction. |
GmailAddOnManifest
Properties customizing the appearance and execution of a Gmail add-on.
JSON representation |
---|
{ "homepageTrigger": { object ( |
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. |
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.
JSON representation |
---|
{ "onTriggerFunction": string, // Union field |
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. |
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.
JSON representation |
---|
{ "text": string, // Union field |
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. |
ComposeTrigger
A trigger that activates when user is composing an email.
JSON representation |
---|
{ "actions": [ { object ( |
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. |
MenuItemExtensionPoint
Common format for declaring a menu item or button that appears within a host app.
JSON representation |
---|
{ "runFunction": string, "label": string, "logoUrl": string } |
Fields | |
---|---|
run |
Required. The endpoint to execute when this extension point is activated. |
label |
Required. User-visible text that describes the action taken by activating this extension point. For example, "Insert invoice." |
logo |
The URL for the logo image shown in the add-on toolbar. If not set, defaults to the add-on's primary logo URL. |
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. |
DriveAddOnManifest
Properties customizing the appearance and execution of a Drive add-on.
JSON representation |
---|
{ "homepageTrigger": { object ( |
Fields | |
---|---|
homepage |
If present, this overrides the configuration from |
on |
Corresponds to behavior that executes when items are selected in the relevant Drive view, such as the My Drive Doclist. |
DriveExtensionPoint
Common format for declaring a Drive add-on's triggers.
JSON representation |
---|
{ "runFunction": string } |
Fields | |
---|---|
run |
Required. The endpoint to execute when the extension point is activated. |
CalendarAddOnManifest
Properties customizing the appearance and execution of a Calendar add-on.
JSON representation |
---|
{ "homepageTrigger": { object ( |
Fields | |
---|---|
homepage |
Defines an endpoint that is 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 might be eclipsed by contextual content when this add-on declares more targeted triggers. If present, this overrides the configuration from |
conference |
Defines conference solutions provided by this add-on. Third-party conferencing add-ons can only be built in Apps Script. |
create |
An endpoint to execute that creates a URL to the add-on's settings page. |
event |
An endpoint that triggers when an event is opened to be viewed or edited. |
event |
An endpoint that triggers when the open event is updated. |
event |
A configuration for a contextual trigger that fires when the user clicks on the add-on attachment provider in the Calendar dropdown menu. |
current |
Defines the level of data access when an event add-on is triggered. |
ConferenceSolution
Defines conference-related values. Third-party conferencing add-ons can only be built in Apps Script.
JSON representation |
---|
{ "onCreateFunction": string, "id": string, "name": string, "logoUrl": string } |
Fields | |
---|---|
on |
Required. The endpoint to call when conference data should be created. |
id |
Required. IDs should be uniquely assigned across conference solutions within one add-on, otherwise the wrong conference solution might be used when the add-on is triggered. While you can change the display name of an add-on, the ID shouldn’t be changed. |
name |
Required. The display name of the conference solution. |
logo |
Required. The URL for the logo image of the conference solution. |
CalendarExtensionPoint
Common format for declaring a calendar add-on's triggers.
JSON representation |
---|
{ "runFunction": string } |
Fields | |
---|---|
run |
Required. The endpoint to execute when this extension point is activated. |
EventAccess
An enum that defines the level of data access event triggers require.
Enums | |
---|---|
UNSPECIFIED |
Default value when nothing is set for eventAccess. |
METADATA |
Gives event triggers the permission to access the metadata of events, such as event ID and calendar ID. |
READ |
Gives event triggers access to all provided event fields including the metadata, attendees, and conference data. |
WRITE |
Gives event triggers access to the metadata of events and the ability to perform all actions, including adding attendees and setting conference data. |
READ_WRITE |
Gives event triggers access to all provided event fields including the metadata, attendees, and conference data and the ability to perform all actions. |
DocsAddOnManifest
Properties customizing the appearance and execution of a Google Docs add-on.
JSON representation |
---|
{ "homepageTrigger": { object ( |
Fields | |
---|---|
homepage |
If present, this overrides the configuration from |
on |
Endpoint to execute when file scope authorization is granted for this document/user pair. |
link |
A list of extension points for previewing links in a Google Docs document. For details, see Preview links with smart chips. |
create |
A list of extension points for creating third-party resources from within Google Workspace applications. For more information, see Create third-party resources from the @ menu. |
DocsExtensionPoint
Common format for declaring a Docs add-on's triggers.
JSON representation |
---|
{ "runFunction": string } |
Fields | |
---|---|
run |
Required. The endpoint to execute when this extension point is activated. |
LinkPreviewExtensionPoint
The configuration for a trigger that fires when a user types or pastes a link from a third-party or non-Google service into a Google Docs, Sheets, or Slides file.
JSON representation |
---|
{
"labelText": string,
"localizedLabelText": {
string: string,
...
},
"patterns": [
{
object ( |
Fields | |
---|---|
label |
Required. The text for an example smart chip that prompts users to preview the link, such as |
localized |
Optional. A map of If a user's locale is present in the map's keys, the user sees the localized version of the An object containing a list of |
patterns[] |
Required. An array of URL patterns that trigger the add-on to preview links. |
run |
Required. Endpoint to execute when a link preview is triggered. |
logo |
Optional. The icon that displays in the smart chip and preview card. If omitted, the add-on uses its toolbar icon, |
UriPattern
The configuration for each URL pattern that triggers a link preview.
JSON representation |
---|
{ "hostPattern": string, "pathPrefix": string } |
Fields | |
---|---|
host |
Required for each URL pattern to preview. The domain of the URL pattern. The add-on previews links that contain this domain in the URL. To preview links for a specific subdomain, like For example, |
path |
Optional. The path that appends the domain of the For example, if the URL host pattern is To match all URLs in the host pattern domain, leave |
CreateActionExtensionPoint
The configuration for a trigger that fires when a user invokes the resource creation workflow in a Google Workspace application. For more information, see Create third-party resources from the @ menu.
JSON representation |
---|
{ "id": string, "labelText": string, "localizedLabelText": { string: string, ... }, "runFunction": string, "logoUrl": string } |
Fields | |
---|---|
id |
Required. The unique ID to differentiate this extension point. The ID can have up to 64 characters and should be in the format of |
label |
Required. The text that displays alongside an icon for the resource creation entry point, such as |
localized |
Optional. A map of If a user's locale is present in the map's keys, the user sees the localized version of the An object containing a list of |
run |
Required. Endpoint to execute when a resource creation workflow is triggered to create a link. |
logo |
Optional. The icon that displays for the resource creation entry point. If omitted, the menu uses your add-on's toolbar icon, |
SheetsAddOnManifest
Properties customizing the appearance and execution of a Google Sheets add-on.
JSON representation |
---|
{ "homepageTrigger": { object ( |
Fields | |
---|---|
homepage |
If present, this overrides the configuration from |
on |
Endpoint to execute when file scope authorization is granted for this document/user pair. |
link |
A list of extension points for previewing links in a Google Sheets document. For details, see Preview links with smart chips. |
SheetsExtensionPoint
Common format for declaring a Sheets add-on's triggers.
JSON representation |
---|
{ "runFunction": string } |
Fields | |
---|---|
run |
Required. The endpoint to execute when this extension point is activated. |
SlidesAddOnManifest
Properties customizing the appearance and execution of a Google Slides add-on.
JSON representation |
---|
{ "homepageTrigger": { object ( |
Fields | |
---|---|
homepage |
If present, this overrides the configuration from |
on |
Endpoint to execute when file scope authorization is granted for this document/user pair. |
link |
A list of extension points for previewing links in a Google Slides document. For details, see Preview links with smart chips. |
SlidesExtensionPoint
Common format for declaring a Slides add-on's triggers.
JSON representation |
---|
{ "runFunction": string } |
Fields | |
---|---|
run |
Required. The endpoint to execute when this extension point is activated. |
HttpOptions
Options for sending requests to add-on HTTP
endpoints.
JSON representation |
---|
{
"authorizationHeader": enum ( |
Fields | |
---|---|
authorization |
Configuration for the token sent in the |
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. |
Methods |
|
---|---|
|
Creates a deployment with the specified name and configuration. |
|
Deletes the deployment with the given name. |
|
Gets the deployment with the specified name. |
|
Gets the install status of a test deployment. |
|
Installs a deployment to your account for testing. |
|
Lists all deployments in a particular project. |
|
Creates or replaces a deployment with the specified name. |
|
Uninstalls a test deployment from the user’s account. |