AddOns Response Service

Add Ons Response Service

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

Classes

Name Brief description
Action An action that Google Workspace add-ons that extend Google Workspace Studio can use to render a new card.
Add Ons Response Service Add Ons Response Service provides the ability to create responses for Google Workspace add-ons that extend Google Workspace Studio.
Basic Data Type An enum that represents the basic generic data types.
Color A Color object which represents a color in the RGBA color space.
Data Type A DataType is used to set the type of a variable.
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.
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.
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.
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.
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 .
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.

Action

Methods

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

Add Ons Response Service

Methods

Method Return type Brief description
Action Creates a new Action .
Navigation Creates a new Navigation .
Render Action Builder Creates a new Render Action Builder .

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.

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.

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.

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.

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.

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
String Prints the JSON representation of this object.
Navigation Pushes the given card onto the stack.

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

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).

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.
Design a Mobile Site
View Site in Mobile | Classic
Share by: