REST Resource: projects.deployments

Resource: Deployment

A Google Workspace Add-on deployment

JSON representation
{
  "name": string,
  "oauthScopes": [
    string
  ],
  "addOns": {
    object (AddOns)
  },
  "etag": string
}
Fields
name

string

The deployment resource name. Example: projects/123/deployments/my_deployment.

oauthScopes[]

string

The list of Google OAuth scopes for which to request consent from the end user before executing an add-on endpoint.

addOns

object (AddOns)

The Google Workspace Add-on configuration.

etag

string

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 (CommonAddOnManifest)
  },
  "gmail": {
    object (GmailAddOnManifest)
  },
  "drive": {
    object (DriveAddOnManifest)
  },
  "calendar": {
    object (CalendarAddOnManifest)
  },
  "docs": {
    object (DocsAddOnManifest)
  },
  "sheets": {
    object (SheetsAddOnManifest)
  },
  "slides": {
    object (SlidesAddOnManifest)
  },
  "httpOptions": {
    object (HttpOptions)
  }
}
Fields
common

object (CommonAddOnManifest)

Configuration that is common across all Google Workspace Add-ons.

gmail

object (GmailAddOnManifest)

Gmail add-on configuration.

drive

object (DriveAddOnManifest)

Drive add-on configuration.

calendar

object (CalendarAddOnManifest)

Calendar add-on configuration.

docs

object (DocsAddOnManifest)

Docs add-on configuration.

sheets

object (SheetsAddOnManifest)

Sheets add-on configuration.

slides

object (SlidesAddOnManifest)

Slides add-on configuration.

httpOptions

object (HttpOptions)

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 (LayoutProperties)
  },
  "addOnWidgetSet": {
    object (AddOnWidgetSet)
  },
  "useLocaleFromApp": boolean,
  "homepageTrigger": {
    object (HomepageExtensionPoint)
  },
  "universalActions": [
    {
      object (UniversalActionExtensionPoint)
    }
  ],
  "openLinkUrlPrefixes": array
}
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

object (LayoutProperties)

Common layout properties for the add-on cards.

addOnWidgetSet

object (AddOnWidgetSet)

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

useLocaleFromApp

boolean

Whether to pass locale information from host app.

homepageTrigger

object (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[]

object (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

array (ListValue format)

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.

LayoutProperties

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

JSON representation
{
  "primaryColor": string,
  "secondaryColor": string,
  "useNewMaterialDesign": boolean
}
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

boolean

Enables material design for cards.

AddOnWidgetSet

The widget subset used by an add-on.

JSON representation
{
  "usedWidgets": [
    enum (WidgetType)
  ]
}
Fields
usedWidgets[]

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

HomepageExtensionPoint

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

JSON representation
{
  "runFunction": string,
  "enabled": boolean
}
Fields
runFunction

string

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

enabled

boolean

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.

UniversalActionExtensionPoint

Format for declaring a universal action menu item extension point.

JSON representation
{
  "label": string,

  // Union field action_type can be only one of the following:
  "openLink": string,
  "runFunction": string
  // End of list of possible types for union field action_type.
}
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.

GmailAddOnManifest

Properties customizing the appearance and execution of a Gmail add-on.

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

object (HomepageExtensionPoint)

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 addons.common.homepageTrigger.

contextualTriggers[]

object (ContextualTrigger)

Defines the set of conditions that trigger the add-on.

universalActions[]

object (UniversalAction)

Defines a set of universal actions for the add-on. The user triggers universal actions from the add-on toolbar menu.

composeTrigger

object (ComposeTrigger)

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 gmail.addons.current.action.compose scope even though it might not edit the draft.

authorizationCheckFunction

string

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,
  "unconditional": {
    object (UnconditionalTrigger)
  }
}
Fields
onTriggerFunction

string

Required. The name of the endpoint to call when a message matches the trigger.

unconditional

object (UnconditionalTrigger)

Unconditional triggers are executed when any mail message is opened.

UnconditionalTrigger

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 action_type can be only one of the following:
  "openLink": string,
  "runFunction": string
  // End of list of possible types for union field action_type.
}
Fields
text

string

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:
runFunction

string

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 (MenuItemExtensionPoint)
    }
  ],
  "draftAccess": enum (DraftAccess)
}
Fields
actions[]

object (MenuItemExtensionPoint)

Defines the set of actions for a compose time add-on. These are actions that users can trigger on a compose time add-on.

draftAccess

enum (DraftAccess)

Defines the level of data access when a compose time add-on is triggered.

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 (HomepageExtensionPoint)
  },
  "onItemsSelectedTrigger": {
    object (DriveExtensionPoint)
  }
}
Fields
homepageTrigger

object (HomepageExtensionPoint)

If present, this overrides the configuration from addons.common.homepageTrigger.

onItemsSelectedTrigger

object (DriveExtensionPoint)

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
runFunction

string

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 (HomepageExtensionPoint)
  },
  "conferenceSolution": [
    {
      object (ConferenceSolution)
    }
  ],
  "createSettingsUrlFunction": string,
  "eventOpenTrigger": {
    object (CalendarExtensionPoint)
  },
  "eventUpdateTrigger": {
    object (CalendarExtensionPoint)
  },
  "currentEventAccess": enum (EventAccess)
}
Fields
homepageTrigger

object (HomepageExtensionPoint)

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 addons.common.homepageTrigger.

conferenceSolution[]

object (ConferenceSolution)

Defines conference solutions provided by this add-on.

createSettingsUrlFunction

string

An endpoint to execute that creates a URL to the add-on's settings page.

eventOpenTrigger

object (CalendarExtensionPoint)

An endpoint that triggers when an event is opened to be viewed or edited.

eventUpdateTrigger

object (CalendarExtensionPoint)

An endpoint that triggers when the open event is updated.

currentEventAccess

enum (EventAccess)

Defines the level of data access when an event add-on is triggered.

ConferenceSolution

Defines conference related values.

JSON representation
{
  "onCreateFunction": string,
  "id": string,
  "name": string,
  "logoUrl": string
}
Fields
onCreateFunction

string

Required. The endpoint to call when conference data should be created.

id

string

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

string

Required. The display name of the conference solution.

logoUrl

string

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
runFunction

string

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 (HomepageExtensionPoint)
  },
  "onFileScopeGrantedTrigger": {
    object (DocsExtensionPoint)
  }
}
Fields
homepageTrigger

object (HomepageExtensionPoint)

If present, this overrides the configuration from addons.common.homepageTrigger.

onFileScopeGrantedTrigger

object (DocsExtensionPoint)

Endpoint to execute when file scope authorization is granted for this document/user pair.

DocsExtensionPoint

Common format for declaring a Docs add-on's triggers.

JSON representation
{
  "runFunction": string
}
Fields
runFunction

string

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

SheetsAddOnManifest

Properties customizing the appearance and execution of a Google Sheets add-on.

JSON representation
{
  "homepageTrigger": {
    object (HomepageExtensionPoint)
  },
  "onFileScopeGrantedTrigger": {
    object (SheetsExtensionPoint)
  }
}
Fields
homepageTrigger

object (HomepageExtensionPoint)

If present, this overrides the configuration from addons.common.homepageTrigger.

onFileScopeGrantedTrigger

object (SheetsExtensionPoint)

Endpoint to execute when file scope authorization is granted for this document/user pair.

SheetsExtensionPoint

Common format for declaring a Sheets add-on's triggers.

JSON representation
{
  "runFunction": string
}
Fields
runFunction

string

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 (HomepageExtensionPoint)
  },
  "onFileScopeGrantedTrigger": {
    object (SlidesExtensionPoint)
  }
}
Fields
homepageTrigger

object (HomepageExtensionPoint)

If present, this overrides the configuration from addons.common.homepageTrigger.

onFileScopeGrantedTrigger

object (SlidesExtensionPoint)

Endpoint to execute when file scope authorization is granted for this document/user pair.

SlidesExtensionPoint

Common format for declaring a Slides add-on's triggers.

JSON representation
{
  "runFunction": string
}
Fields
runFunction

string

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 (HttpAuthorizationHeader)
}
Fields
authorizationHeader

enum (HttpAuthorizationHeader)

Configuration for the token sent in the HTTP Authorization header.

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

create

Creates a deployment with the specified name and configuration.

delete

Deletes the deployment with the given name.

get

Gets the deployment with the specified name.

getInstallStatus

Gets the install status of a test deployment.

install

Installs a deployment to your account for testing.

list

Lists all deployments in a particular project.

replaceDeployment

Creates or replaces a deployment with the specified name.

uninstall

Uninstalls a test deployment from the user’s account.