AddOns Response Service

Add Ons Response Service

This service allows scripts to configure and build Google Workspace add-ons.

Classes

Name Brief description
Accessory Widget
Action An action that Google Workspace add-ons that extend Google Workspace Studio can use to render a new card.
Action Response
Action Response Builder
Add Ons Response Service Add Ons Response Service provides the ability to create responses for Google Workspace add-ons.
Addon Compose Ui Action Response
Addon Compose Ui Action Response Builder
Addon Compose Ui Action Type
Attachment
Basic Data Type An enum that represents the basic generic data types.
Calendar Event Action Response
Calendar Event Action Response Builder
Chat Data Actions Response Builder
Chat Message
Color A Color object which represents a color in the RGBA color space.
Compose Action Response
Compose Action Response Builder
Composed Email Type
Content Type
Create Message Action
Data Actions Response
Data Type A DataType is used to set the type of a variable.
Drive Items Selected Action Response
Drive Items Selected Action Response Builder
Dynamic Resource Definition A DynamicResourceDefinition is a building block for a Resource Fields Definition Retrieved Action , it can contain one or more numbers of Resource Field to dynamically define the number of output variables provided by a step in Google Workspace Studio.
Editor File Scope Action Response
Editor File Scope Action Response Builder
End Navigation
Error Actionability A Enum that represents the error actionability.
Error Retryability A Enum that represents the retry-ability of action invocation when having an error.
Font Weight An enum that represents the font weight of the styled text.
Host App Action A HostAppAction is a type of Action that is handled by individual host apps.
Hyperlink A Hyperlink element used in Text Format Element .
Insert Section A builder for InsertSection objects.
Insert Widget A builder for InsertWidget objects.
Link The link object from a third-party resource which gets converted it to a smart chip in the host application.
Link Preview
List Container Container for list items, where each list item can contain multiple Text Format Element .
List Item A list item, where each list item can contain multiple Text Format Element .
List Type An enum that represents the type of the list.
Modify Card A builder for Modify Card objects that changes and updates an existing card's interface by passing the Modify Card object to a Action .
Navigation A helper object that controls card navigation.
Notification
On Close
Open As
Open Link
Remove Section A builder for Remove Section objects.
Remove Widget A builder for RemoveWidget objects.
Render Action Renders or updates a card by performing an Action in response to a user interaction.
Render Action Builder A builder for Render Action objects.
Resource Data Represents a application specific resource data, a resource data contains a collection of key-value pairs of variable names and Variable Data .
Resource Field A ResourceField is a basic building block of a Dynamic Resource Definition , each resource field corresponds to a output variable of the current step.
Resource Fields Definition Retrieved Action A Resource Fields Definition Retrieved Action is a type of Resource Fields Definition Retrieved Action that is used to retrieve the definition of a list of resource fields through the dynamic Resource Definition Provider function specified in the manifest.
Resource Retrieved Action A ResourceRetrievedAction is used to retrieve custom resource content when needed, where the custom resource field is defined in the ResourceData.
Resource Type An application specific resource type, the unique identifier of the resource type should have a corresponding WorkflowResourceDefinition.
Return Element Error Action A ReturnElementErrorAction indicates that an error occurred during element invocation.
Return Output Variables Action Contains output variables generated by the executed action in Google Workspace Studio.
Save Workflow Action This action indicates that the host app (Google Workspace Studio) should save the agent.
Send Status
Styled Text Text element with styles such as bold, italic and color.
Text Format Chip A clickable chip in the text format.
Text Format Element A text format element, which can be a Text Format Chip , Styled Text , Hyperlink , or List Container .
Text Format Icon An icon that is displayed in a Text Format Chip .
Text Style An enum that represents the style of the styled text.
Time Stamp Represents a timestamp object which is can be added to a Variable Data .
Universal Action Response
Universal Action Response Builder
Update Draft Action Response
Update Draft Action Response Builder
Update Draft Bcc Recipients Action
Update Draft Body Action
Update Draft Body Type
Update Draft Cc Recipients Action
Update Draft Subject Action
Update Draft To Recipients Action
Update Inline Preview Action
Update Message Action
Update Widget A builder for Update Widget objects.
Validation Error Severity An enum that represents the severity of the validation error.
Value Metadata A valueMetadata contains information about the potential values of a variable.
Variable Data Represents a variable data which can contain a collection of values in various types.
Workflow Action A WorkflowAction is a type of Host App Action that is used to perform a specific action in Google Workspace Studio.
Workflow Text Format A block of text with rich formatting options including styles, hyperlinks, and interactive elements defined in Text Format Element .
Workflow Validation Error Action This action indicates that the host app (Google Workspace Studio) should display a validation error.

Accessory Widget

Methods

Method Return type Brief description
Accessory Widget Sets the widget for this action.

Action

Methods

Method Return type Brief description
Action Adds a ModifyCard operation to the action.
Action Adds a card navigation to the action.

Action Response

Methods

Method Return type Brief description
String Prints the JSON representation of this object.

Action Response Builder

Methods

Method Return type Brief description
Action Response Builder Sets the modify card operation to the action.
Action Response Builds the current action response and validates it.
Action Response Builder Sets the LinkPreview to the action.
Action Response Builder Sets the response to a Navigation action.
Action Response Builder Sets the notification to display when the action is activated.
Action Response Builder Sets the URL to navigate to when the action is activated.
Action Response Builder Sets a flag to indicate that this action changed the existing data state.

Add Ons Response Service

Properties

Property Type Description
Addon Compose Ui Action Type
Addon Compose Ui Action Type The Addon Compose Ui Action Type enumeration.
Composed Email Type
Composed Email Type The Composed Email Type enumeration.
Content Type
Content Type The Content Type enumeration.
End Navigation
End Navigation The End Navigation enumeration.
On Close
On Close The On Close enumeration.
Open As
Open As The Open As enumeration.
Send Status
Send Status The Send Status enumeration.
Update Draft Body Type
Update Draft Body Type The Update Draft Body Type enumeration.

Methods

Method Return type Brief description
Accessory Widget Creates a new Accessory Widget .
Action Creates a new Action .
Action Response Builder Creates a Action Response Builder .
Addon Compose Ui Action Response Builder Creates a Addon Compose Ui Action Response Builder .
Attachment Creates a Attachment .
Calendar Event Action Response Builder Creates a Calendar Event Action Response Builder .
Chat Data Actions Response Builder Creates a Chat Data Actions Response Builder .
Chat Message Creates a Chat Message .
Compose Action Response Builder Creates a Compose Action Response Builder .
Create Message Action Creates a Create Message Action .
Drive Items Selected Action Response Builder Creates a Drive Items Selected Action Response Builder .
Editor File Scope Action Response Builder Creates a Editor File Scope Action Response Builder .
Link Preview Creates a Link Preview .
Navigation Creates a Navigation .
Notification Creates a Notification .
Open Link Creates a Open Link .
Render Action Builder Creates a new Render Action Builder .
Universal Action Response Builder Creates a Universal Action Response Builder .
Update Draft Action Response Builder Creates a Update Draft Action Response Builder .
Update Draft Bcc Recipients Action Creates a Update Draft Bcc Recipients Action ;
Update Draft Body Action Creates a Update Draft Body Action .
Update Draft Cc Recipients Action Creates a Update Draft Cc Recipients Action .
Update Draft Subject Action Creates a Update Draft Subject Action .
Update Draft To Recipients Action Creates a Update Draft To Recipients Action .
Update Inline Preview Action Creates a Update Inline Preview Action .
Update Message Action Creates a Update Message Action .

Addon Compose Ui Action Response

Methods

Method Return type Brief description
String Prints the JSON representation of this object.

Addon Compose Ui Action Response Builder

Methods

Method Return type Brief description
Addon Compose Ui Action Response Builds the current addon compose ui action response and validates it.
Addon Compose Ui Action Response Builder Sets the enum field that determines the addon compose ui action.

Addon Compose Ui Action Type

Properties

Property Type Description
DISMISS
Enum Default.

Attachment

Methods

Method Return type Brief description
Attachment Sets the icon URL for the attachment.
Attachment Sets the MIME type for the attachment.
Attachment Sets the resource URL for the attachment.
Attachment Sets the title for the attachment.

Basic Data Type

Properties

Property Type Description
BASIC_TYPE_UNSPECIFIED
Enum Default value.
STRING
Enum A string of characters.
INTEGER
Enum An integer value.
FLOAT
Enum A floating point number.
TIMESTAMP
Enum A timestamp in ISO 8601 format.
BOOLEAN
Enum A boolean value.
EMAIL_ADDRESS
Enum A string in the format of an email address.
GOOGLE_USER
Enum A user of the Google services, in the format of “users/encoded_GAIA_ID”
FILE
Enum A file type.
FORMATTED_TEXT
Enum A text with rich formatting.

Calendar Event Action Response

Methods

Method Return type Brief description
String Prints the JSON representation of this object.

Calendar Event Action Response Builder

Methods

Method Return type Brief description
Calendar Event Action Response Builder Specifies that the response should add the attachments to the Calendar event when the associated UI action is taken.
Calendar Event Action Response Builder Specifies that the response should add the indicated attendees to the Calendar event when the associated UI action is taken.
Calendar Event Action Response Builds the current Calendar event action response and validates it.
Calendar Event Action Response Builder Specifies that the response should set the indicated conference data to the Calendar event when the associated UI action is taken.

Chat Data Actions Response Builder

Methods

Method Return type Brief description
Data Actions Response Builds the current action response.
Chat Data Actions Response Builder Sets the Create Message Action for this Data Actions Response .
Chat Data Actions Response Builder Sets the Update Message Action for this Data Actions Response .
Chat Data Actions Response Builder Sets the Update Inline Preview Action for this Data Actions Response .

Chat Message

Methods

Method Return type Brief description
Chat Message Sets the card of the message.
Chat Message Sets the text of the message.

Color

Methods

Method Return type Brief description
Color Sets the alpha component of the color.
Color Sets the blue component of the color.
Color Sets the green component of the color.
Color Sets the red component of the color.

Compose Action Response

Methods

Method Return type Brief description
String Prints the JSON representation of this object.

Compose Action Response Builder

Methods

Method Return type Brief description
Compose Action Response Builds the current compose action response and validates it.
Compose Action Response Builder Sets the draft Gmail Message created using Gmail Message.createDraftReply(body) or similar functions.

Composed Email Type

Properties

Property Type Description
REPLY_AS_DRAFT
Enum A draft that is a reply to another message.
STANDALONE_DRAFT
Enum A draft that is a standalone message.

Content Type

Properties

Property Type Description
TEXT
Enum Indicates that the generated content is plain text.
MUTABLE_HTML
Enum Indicates that the generated content is formatted as HTML.
IMMUTABLE_HTML
Enum Indicates that the generated content is formatted as HTML, but this content cannot be edited after it is generated.

Create Message Action

Methods

Method Return type Brief description
Create Message Action Sets the message for this action.

Data Actions Response

Methods

Method Return type Brief description
String Prints the JSON representation of this object.

Data Type

Methods

Method Return type Brief description
Data Type Sets the data type to one of the supported Basic Data Type s.
Data Type Sets the data type to a custom defined Resource Type .
Data Type Sets the Value Metadata , which contains type-related information related to the variable.

Drive Items Selected Action Response

Methods

Method Return type Brief description
String Prints the JSON representation of this object.

Drive Items Selected Action Response Builder

Methods

Method Return type Brief description
Drive Items Selected Action Response Builds the current Drive action response.
Drive Items Selected Action Response Builder Specifies that the response requests file scope for the contextually-relevant item in Drive.

Dynamic Resource Definition

Methods

Method Return type Brief description
Dynamic Resource Definition Adds a resource field to the dynamic resource definition.
Dynamic Resource Definition Sets the ID for the dynamic resource definition, this ID corresponds to the workflow Resource Definition Id in the manifest.

Editor File Scope Action Response

Methods

Method Return type Brief description
String Prints the JSON representation of this object.

Editor File Scope Action Response Builder

Methods

Method Return type Brief description
Editor File Scope Action Response Builds the current Editor action response.
Editor File Scope Action Response Builder Requests the drive.file scope for the current active Editor document.

End Navigation

Properties

Property Type Description
ACTION_UNSPECIFIED
Enum Action unspecified.
CLOSE_DIALOG
Enum Closes a dialog .
CLOSE_DIALOG_AND_EXECUTE
Enum Closes a dialog and refreshes the card that opened the dialog.

Error Actionability

Properties

Property Type Description
ERROR_ACTIONABILITY_UNSPECIFIED
Enum Unspecified.
NOT_ACTIONABLE
Enum The error is not fixable by the user through the configuration card.
ACTIONABLE
Enum The error is fixable by the user through the configuration card.

Error Retryability

Properties

Property Type Description
RETRYABILITY_UNSPECIFIED
Enum Unspecified.
NOT_RETRYABLE
Enum The error is not retryable, the flow terminates after the first try.
RETRYABLE
Enum The error is retryable, Workflow is going to try to execute the Step for up to 5 times.

Font Weight

Properties

Property Type Description
FONT_WEIGHT_UNSPECIFIED
Enum Standard weight with normal thickness.
LIGHT
Enum Lighter weight with reduced thickness.
MEDIUM
Enum Intermediate weight between light and bold.
BOLD
Enum Heavier weight with increased thickness.

Host App Action

Methods

Method Return type Brief description
Host App Action Sets the host app action to Workflow action.

Methods

Method Return type Brief description
Hyperlink Sets the destination URL of the hyperlink.
Hyperlink Sets the text of the hyperlink.

Insert Section

Methods

Method Return type Brief description
Insert Section Sets the onCardTop flag, which indicates whether the new section should be inserted at the top of the card.
Insert Section Sets the section ID, and the new section is inserted below it.
Insert Section Sets the card section to be inserted.

Insert Widget

Methods

Method Return type Brief description
Insert Widget Sets the widget ID, and the new widget is inserted above the widget with the given ID.
Insert Widget Sets the widget ID, and the new widget is inserted below the widget with the given ID.
Insert Widget Sets the Widget to be inserted.

Methods

Method Return type Brief description
Link Sets the title of the link.
Link Sets the URL of the link.

Link Preview

Methods

Method Return type Brief description
String Prints the JSON representation of this object.
Link Preview Sets the title that displays in the link preview above the preview card.
Link Preview Sets the card that displays information about a link from a third-party or non-Google service.
Link Preview Sets the title that displays in the smart chip for the link preview.

List Container

Methods

Method Return type Brief description
List Container Adds a list item to the list container.
List Container Sets the level of the list, starts from 0 for the top level, and increases by 1 for each nested list.
List Container Sets the type of the list to be ordered or unordered.

List Item

Methods

Method Return type Brief description
List Item Adds a Text Format Element to the list item.

List Type

Properties

Property Type Description
LIST_TYPE_UNSPECIFIED
Enum Default value.
ORDERED
Enum Ordered list.
UNORDERED
Enum Unordered list.

Modify Card

Methods

Method Return type Brief description
Modify Card Sets the Insert Section for this modify card object.
Modify Card Sets the Insert Widget for this modify card object.
Modify Card Sets the Remove Section for this modify card object.
Modify Card Sets the Remove Widget for this modify card object.
Modify Card Sets the replacement Card Section for this modify card object, the replacement section should have the same id as an existing card section.
Modify Card Sets the replacement widget for this modify card object, the replacement widget should have the same id as an existing widget.
Modify Card Sets the Update Widget for this modify card object.

Methods

Method Return type Brief description
Navigation
Navigation
Navigation
String Prints the JSON representation of this object.
Navigation Pushes the given card onto the stack.
Navigation Sets the end navigation action.
Navigation Does an in-place replacement of the current card.

Notification

Methods

Method Return type Brief description
Notification Sets the text to show in the notification.

On Close

Properties

Property Type Description
NOTHING
Enum Do nothing on close.
RELOAD
Enum Reloads the add-on on when the window closes.

Open As

Properties

Property Type Description
FULL_SIZE
Enum Open in a full window or tab.
OVERLAY
Enum Open as an overlay such as a pop-up.

Methods

Method Return type Brief description
Open Link Sets the behavior of the URL action when the URL window or tab is closed.
Open Link Sets the behavior of URL when it is opened.
Open Link Sets the URL to be opened.

Remove Section

Methods

Method Return type Brief description
Remove Section Sets the section ID of the section to be removed.

Remove Widget

Methods

Method Return type Brief description
Remove Widget Sets the widget ID of the widget to be removed.

Render Action

Methods

Method Return type Brief description
String Prints the JSON representation of this object.

Render Action Builder

Methods

Method Return type Brief description
Render Action Builds the current render action and validates it.
Render Action Builder Sets the action that add-ons can use to update the UI to the render action.
Render Action Builder Sets the Host App Action handled by individual host apps to the render action.

Resource Data

Methods

Method Return type Brief description
Resource Data Adds a Variable Data keyed by its variable name, a value is overwritten if the key already exists.
Resource Data Sets the map of the variable data keyed by variable names.

Resource Field

Methods

Method Return type Brief description
Resource Field Sets the data type of the field, allows other steps to filter the variables by type at selection.
Resource Field Sets the description of the field that is displayed to the end user during variable selection in subsequent steps.
Resource Field Sets a key for the provider function to provide the value to during the step's execution.

Resource Fields Definition Retrieved Action

Methods

Method Return type Brief description
Resource Fields Definition Retrieved Action Adds a Dynamic Resource Definition to the resource fields definition retrieved action.

Resource Retrieved Action

Methods

Method Return type Brief description
Resource Retrieved Action Sets the Resource Data to the resource retrieved action to provide values to the dynamic resource fields or custom resource fields.

Resource Type

Methods

Method Return type Brief description
Resource Type Sets the workflow resource definition id.

Return Element Error Action

Methods

Method Return type Brief description
Return Element Error Action Sets the error actionability, an error should be actionable if it can be resolved by re-configuring the step.
Return Element Error Action Sets the error log to be displayed to the end user at Workflow's activity feed.
Return Element Error Action Sets the error retry-ability, the flow terminates after the first try if an error is not retryable.

Return Output Variables Action

Methods

Method Return type Brief description
Return Output Variables Action Adds a variable data keyed by its variable name, a value is overwritten if the key already exists.
Return Output Variables Action Sets the Log of the executed workflow action to the end user at Workflow's activity feed.
Return Output Variables Action Sets the map of the variable data keyed by variable name, a value is overwritten if the key already exists.

Save Workflow Action

Send Status

Properties

Property Type Description
NOT_SEND
Enum Default.
CONTINUE_SEND
Enum Continue sending the email after updating the draft.

Styled Text

Methods

Method Return type Brief description
Styled Text Sets the style of the styled text, can apply multiple styles to a single styled text.
Styled Text Sets the color of the styled text.
Styled Text Sets the font weight of the styled text.
Styled Text Sets the main content of the styled text.

Text Format Chip

Methods

Method Return type Brief description
Text Format Chip Sets the text displayed in the chip.
Text Format Chip Sets the icon displayed in the chip.
Text Format Chip Sets the URL to navigate to when the chip is clicked.

Text Format Element

Methods

Method Return type Brief description
Text Format Element Sets the text format element as a Hyperlink .
Text Format Element Sets the text format element as a List Container .
Text Format Element Sets the text format element as a Styled Text .
Text Format Element Sets the text format element as a text string.
Text Format Element Sets the text format element as a Text Format Chip .

Text Format Icon

Methods

Method Return type Brief description
Text Format Icon Sets the icon URL.
Text Format Icon Sets the material icon name defined in Google Material Icons.

Text Style

Properties

Property Type Description
STYLE_UNSPECIFIED
Enum No style applied.
ITALIC
Enum Italic style.
UNDERLINE
Enum Underline style.
STRIKETHROUGH
Enum Strikethrough style.
LINE_BREAK
Enum Line break.
UPPERCASE
Enum Uppercase style.
CODE
Enum Code style.
CODE_BLOCK
Enum Code block style.

Time Stamp

Methods

Method Return type Brief description
Time Stamp Sets the nanos of the timestamp, it represents the number of nanoseconds within the current second.
Time Stamp Sets the seconds of the timestamp, it represents the number of seconds since the Unix epoch(January 1, 1970, 00:00:00 UTC).

Universal Action Response

Methods

Method Return type Brief description
String Prints the JSON representation of this object.

Universal Action Response Builder

Methods

Method Return type Brief description
Universal Action Response Builds the current universal action response and validates it.
Universal Action Response Builder Displays the add-on with the specified cards.
Universal Action Response Builder Sets the URL to open when the universal action is selected.

Update Draft Action Response

Methods

Method Return type Brief description
String Prints the JSON representation of this object.

Update Draft Action Response Builder

Methods

Method Return type Brief description
Update Draft Action Response Builds the current update draft action response and validates it.
Update Draft Action Response Builder Sets the enum field that determines whether or not the email sends after the update action.
Update Draft Action Response Builder Sets an action that updates the email Bcc recipients of a draft.
Update Draft Action Response Builder Set an action that updates the email body of a draft.
Update Draft Action Response Builder Sets an action that updates the Cc recipients of a draft.
Update Draft Action Response Builder Sets an action that updates the subject line of a draft.
Update Draft Action Response Builder Sets an action that updates the To recipients of a draft.

Update Draft Bcc Recipients Action

Methods

Method Return type Brief description
Update Draft Bcc Recipients Action Updates the Bcc recipients of an email draft.

Update Draft Body Action

Methods

Method Return type Brief description
Update Draft Body Action Adds the specified content to the draft body.
Update Draft Body Action Sets the Update Draft Body Type of this update action on the draft body.

Update Draft Body Type

Properties

Property Type Description
IN_PLACE_INSERT
Enum Default.
INSERT_AT_START
Enum Update actions insert content at the start of message body.
INSERT_AT_END
Enum Update actions insert content at the end of the message body.

Update Draft Cc Recipients Action

Methods

Method Return type Brief description
Update Draft Cc Recipients Action Updates the Cc recipients of an email draft.

Update Draft Subject Action

Methods

Method Return type Brief description
Update Draft Subject Action Updates the subject line of an email draft.

Update Draft To Recipients Action

Methods

Method Return type Brief description
Update Draft To Recipients Action Updates the To recipients of an email draft.

Update Inline Preview Action

Methods

Method Return type Brief description
Update Inline Preview Action Adds the card for this action.
Update Inline Preview Action Adds the expiration for this action.

Update Message Action

Methods

Method Return type Brief description
Update Message Action Sets the message for this action.

Update Widget

Methods

Method Return type Brief description
Update Widget Adds a new item that can be selected, for multi-select menus.

Validation Error Severity

Properties

Property Type Description
SEVERITY_UNSPECIFIED
Enum Unspecified.
CRITICAL
Enum Critical, the error is critical and must be fixed before publish.
WARNING
Enum Warning, the error is non-critical and is not blocking publish.

Methods

Method Return type Brief description
Value Metadata Adds a optional allowed types that can be dynamically casted for a variable data to this value metadata.
Value Metadata Adds an optional string value to the allowed enum values of a variable, this field can only be set if the Data Type is set to String type.
Value Metadata Sets the optional default value of the variable, example, if the variable type is boolean, defaultValue may be set to " true " or " false ".

Variable Data

Methods

Method Return type Brief description
Variable Data Adds a boolean value to the variable data.
Variable Data Adds an email address to the variable data.
Variable Data Adds a float value to the variable data.
Variable Data Adds a google user to the variable data.
Variable Data Adds an integer value to the variable data.
Variable Data Adds a Resource Data value to the variable data.
Variable Data Adds a resource reference ID to the variable data.
Variable Data Adds a string value to the variable data.
Variable Data Adds a Time Stamp value to the variable data.
Variable Data Adds a Workflow Text Format value to the variable data.

Workflow Action

Workflow Text Format

Methods

Method Return type Brief description
Workflow Text Format Adds a Text Format Element to the workflow text format.

Workflow Validation Error Action

Methods

Method Return type Brief description
Workflow Validation Error Action Sets the severity of the validation error.
Create a Mobile Website
View Site in Mobile | Classic
Share by: