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
|
Add
provides the ability to create responses for Google Workspace
add-ons that extend Google Workspace Studio. |
Basic
|
An enum that represents the basic generic data types. |
Color
|
A Color object which represents a color in the RGBA color space. |
Data
|
A DataType is used to set the type of a variable. |
Dynamic
|
A DynamicResourceDefinition is a building block for a Resource
, it can contain one or more numbers of Resource
to dynamically define the number of output variables provided by a step in Google
Workspace Studio. |
Error
|
A Enum that represents the error actionability. |
Error
|
A Enum that represents the retry-ability of action invocation when having an error. |
Font
|
An enum that represents the font weight of the styled text. |
Host
|
A HostAppAction is a type of Action that is handled by individual host apps. |
Hyperlink
|
A Hyperlink element used in Text
. |
Insert
|
A builder for InsertSection objects. |
Insert
|
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 for list items, where each list item can contain multiple Text
. |
List
|
A list item, where each list item can contain multiple Text
. |
List
|
An enum that represents the type of the list. |
Modify
|
A builder for Modify
objects that changes and updates an existing card's
interface by passing the Modify
object to a Action
. |
Navigation
|
A helper object that controls card navigation. |
Remove
|
A builder for Remove
objects. |
Remove
|
A builder for RemoveWidget objects. |
Render
|
Renders or updates a card by performing an Action
in response to a user interaction. |
Render
|
A builder for Render
objects. |
Resource
|
Represents a application specific resource data, a resource data contains a collection of
key-value pairs of variable names and Variable
. |
Resource
|
A ResourceField is a basic building block of a Dynamic
, each resource
field corresponds to a output variable of the current step. |
Resource
|
A Resource
is a type of Resource
that is
used to retrieve the definition of a list of resource fields through the dynamic
function specified in the manifest. |
Resource
|
A ResourceRetrievedAction is used to retrieve custom resource content when needed, where the custom resource field is defined in the ResourceData. |
Resource
|
An application specific resource type, the unique identifier of the resource type should have a corresponding WorkflowResourceDefinition. |
Return
|
A ReturnElementErrorAction indicates that an error occurred during element invocation. |
Return
|
Contains output variables generated by the executed action in Google Workspace Studio. |
Save
|
This action indicates that the host app (Google Workspace Studio) should save the agent. |
Styled
|
Text element with styles such as bold, italic and color. |
Text
|
A clickable chip in the text format. |
Text
|
A text format element, which can be a Text
, Styled
, Hyperlink
, or List
. |
Text
|
An icon that is displayed in a Text
. |
Text
|
An enum that represents the style of the styled text. |
Time
|
Represents a timestamp object which is can be added to a Variable
. |
Update
|
A builder for Update
objects. |
Validation
|
An enum that represents the severity of the validation error. |
Value
|
A valueMetadata contains information about the potential values of a variable. |
Variable
|
Represents a variable data which can contain a collection of values in various types. |
Workflow
|
A WorkflowAction is a type of Host
that is used to perform a specific action in
Google Workspace Studio. |
Workflow
|
A block of text with rich formatting options including styles, hyperlinks, and interactive
elements defined in Text
. |
Workflow
|
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
|
Creates a new Render
. |
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
|
Sets the data type to one of the supported Basic
s. |
|
Data
|
Sets the data type to a custom defined Resource
. |
|
Data
|
Sets the Value
, which contains type-related information related to the
variable. |
Dynamic
Resource
Definition
Methods
| Method | Return type | Brief description |
|---|---|---|
Dynamic
|
Adds a resource field to the dynamic resource definition. | |
Dynamic
|
Sets the ID for the dynamic resource definition, this ID corresponds to the workflow
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
|
Sets the host app action to Workflow action. |
Hyperlink
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
|
Sets the onCardTop flag, which indicates whether the new section should be inserted at the top of the card. | |
Insert
|
Sets the section ID, and the new section is inserted below it. | |
Insert
|
Sets the card section to be inserted. |
Insert
Widget
Methods
| Method | Return type | Brief description |
|---|---|---|
Insert
|
Sets the widget ID, and the new widget is inserted above the widget with the given ID. | |
Insert
|
Sets the widget ID, and the new widget is inserted below the widget with the given ID. | |
Insert
|
Sets the Widget
to be inserted. |
Link
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
|
Adds a list item to the list container. | |
List
|
Sets the level of the list, starts from 0 for the top level, and increases by 1 for each nested list. | |
List
|
Sets the type of the list to be ordered or unordered. |
List
Item
Methods
| Method | Return type | Brief description |
|---|---|---|
List
|
Adds a Text
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
|
Sets the Insert
for this modify card object. |
|
Modify
|
Sets the Insert
for this modify card object. |
|
Modify
|
Sets the Remove
for this modify card object. |
|
Modify
|
Sets the Remove
for this modify card object. |
|
Modify
|
Sets the replacement Card
for this modify card object, the replacement section
should have the same id as an existing card section. |
|
Modify
|
Sets the replacement widget for this modify card object, the replacement widget should have the same id as an existing widget. | |
Modify
|
Sets the Update
for this modify card object. |
Navigation
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
|
Sets the section ID of the section to be removed. |
Remove
Widget
Methods
| Method | Return type | Brief description |
|---|---|---|
Remove
|
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
|
Builds the current render action and validates it. | |
Render
|
Sets the action that add-ons can use to update the UI to the render action. | |
Render
|
Sets the Host
handled by individual host apps to the render action. |
Resource
Data
Methods
| Method | Return type | Brief description |
|---|---|---|
Resource
|
Adds a Variable
keyed by its variable name, a value is overwritten if the key
already exists. |
|
Resource
|
Sets the map of the variable data keyed by variable names. |
Resource
Field
Methods
| Method | Return type | Brief description |
|---|---|---|
Resource
|
Sets the data type of the field, allows other steps to filter the variables by type at selection. | |
Resource
|
Sets the description of the field that is displayed to the end user during variable selection in subsequent steps. | |
Resource
|
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
|
Adds a Dynamic
to the resource fields definition retrieved action. |
Resource
Retrieved
Action
Methods
| Method | Return type | Brief description |
|---|---|---|
Resource
|
Sets the Resource
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
|
Sets the workflow resource definition id. |
Return
Element
Error
Action
Methods
| Method | Return type | Brief description |
|---|---|---|
Return
|
Sets the error actionability, an error should be actionable if it can be resolved by re-configuring the step. | |
Return
|
Sets the error log to be displayed to the end user at Workflow's activity feed. | |
Return
|
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
|
Adds a variable data keyed by its variable name, a value is overwritten if the key already exists. | |
Return
|
Sets the Log of the executed workflow action to the end user at Workflow's activity feed. | |
Return
|
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
|
Sets the style of the styled text, can apply multiple styles to a single styled text. | |
Styled
|
Sets the color of the styled text. | |
Styled
|
Sets the font weight of the styled text. | |
Styled
|
Sets the main content of the styled text. |
Text
Format
Chip
Methods
| Method | Return type | Brief description |
|---|---|---|
Text
|
Sets the text displayed in the chip. | |
Text
|
Sets the icon displayed in the chip. | |
Text
|
Sets the URL to navigate to when the chip is clicked. |
Text
Format
Element
Methods
| Method | Return type | Brief description |
|---|---|---|
Text
|
Sets the text format element as a Hyperlink
. |
|
Text
|
Sets the text format element as a List
. |
|
Text
|
Sets the text format element as a Styled
. |
|
Text
|
Sets the text format element as a text string. | |
Text
|
Sets the text format element as a Text
. |
Text
Format
Icon
Methods
| Method | Return type | Brief description |
|---|---|---|
Text
|
Sets the icon URL. | |
Text
|
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
|
Sets the nanos of the timestamp, it represents the number of nanoseconds within the current second. | |
Time
|
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
|
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. |
Value
Metadata
Methods
| Method | Return type | Brief description |
|---|---|---|
Value
|
Adds a optional allowed types that can be dynamically casted for a variable data to this value metadata. | |
Value
|
Adds an optional string value to the allowed enum values of a variable, this field can only be
set if the Data
is set to String type. |
|
Value
|
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
|
Adds a boolean value to the variable data. | |
Variable
|
Adds an email address to the variable data. | |
Variable
|
Adds a float value to the variable data. | |
Variable
|
Adds a google user to the variable data. | |
Variable
|
Adds an integer value to the variable data. | |
Variable
|
Adds a Resource
value to the variable data. |
|
Variable
|
Adds a resource reference ID to the variable data. | |
Variable
|
Adds a string value to the variable data. | |
Variable
|
Adds a Time
value to the variable data. |
|
Variable
|
Adds a Workflow
value to the variable data. |
Workflow
Action
Workflow
Text
Format
Methods
| Method | Return type | Brief description |
|---|---|---|
Workflow
|
Adds a Text
to the workflow text format. |
Workflow
Validation
Error
Action
Methods
| Method | Return type | Brief description |
|---|---|---|
Workflow
|
Sets the severity of the validation error. |

