Card Service

Card Service

This service allows scripts to configure and build card and widget components and behaviors for a UI. The UI structures you build with this service are automatically available in both desktop and mobile devices, so you don't need to develop separate UIs for both.

Classes

Name Brief description
Action An action that enables interactivity within UI elements.
Action Response The response object that may be returned from a callback function (e.g., a form response handler) to perform one or more actions on the client.
Action Response Builder A builder for Action Response objects.
Action Status A class that represents the status for a request to either invoke or submit a dialog.
Attachment Represents an attachment created by an add-on.
Authorization Action An authorization action that will send the user to the AuthorizationUrl when clicked.
Authorization Exception An error that can be returned to trigger an authorization card to be shown to the user.
Border Style A class that represents a complete border style that can be applied to widgets.
Border Type An enum that represents the border types that can be applied to widgets.
Button A base class for all buttons.
Button Set Holds a set of Button objects that are displayed in a row.
Calendar Event Action Response Represents a response that makes changes to the calendar event that the user is currently editing in reaction to an action taken in the UI, such as a button click.
Calendar Event Action Response Builder A builder for Calendar Event Action Response objects.
Card A context card that represents a single view in the UI.
Card Action A clickable menu item that is added to the card header menu.
Card Builder A builder for Card objects.
Card Header The header of a Card .
Card Section A card section holds groups of widgets and provides visual separation between them.
Card Service Card Service provides the ability to create generic cards used across different Google extensibility products, such as Google Workspace add-ons .
Card With Id A builder for Card With Id objects.
Carousel Carousel, also known as slider, rotates and displays a list of widgets in a slideshow format, with buttons navigating to the previous or next widget.
Carousel Card A card that can be displayed as a carousel item.
Chat Action Response A class that represents the parameters that a Chat app can use to configure how its response is posted.
Chat Client Data Source For a Selection Input widget that uses a multiselect menu, a data source from Google Chat.
Chat Response The response object for a card message in Google Chat.
Chat Response Builder A builder for Chat Response objects.
Chat Space Data Source A data source that populates Google Chat spaces as selection items for a multiselect menu.
Chip A Chip with an icon and text label.
Chip List Holds a set of Chip objects that are displayed in a row, wrapping to the next line to horizontal scrollable.
Chip List Layout An enum that specifies the layout for Chip List .
Collapse Control A customizable collapse and expand control.
Column A column.
Columns The Columns widget displays up to 2 columns in a card or dialog.
Common Data Source A data source shared by all Google Workspace applications.
Compose Action Response The response object that may be returned from a callback method for compose action in a Gmail add-on .
Compose Action Response Builder A builder for Compose Action Response objects.
Composed Email Type An enum value that specifies whether the composed email is a standalone or reply draft.
Content Type An enum value that specifies the content type of the content generated by a Update Draft Action Response .
Date Picker An input field that allows inputing a date.
Date Time Picker An input field that allows users to input a date and time.
Decorated Text A widget that displays text with optional decorations.
Dialog For details, see Open interactive dialogs in the Google Chat documentation.
Dialog Action A builder for Dialog Action objects.
Display Style An enum that defines the display style of card.
Divider A horizontal divider.
Drive Items Selected Action Response Represents a response that makes changes to Drive while Drive items are selected and in reaction to an action taken in the UI, such as a button click.
Drive Items Selected Action Response Builder A builder for Drive Items Selected Action Response objects.
Editor File Scope Action Response Makes changes to an Editor, such as Google Docs, Sheets, or Slides in reaction to an action taken in the UI.
Editor File Scope Action Response Builder A builder for Editor File Scope Action Response objects.
Fixed Footer The fixed footer shown at the bottom of a Card .
Grid An organized grid to display a collection of grid items.
Grid Item The items users interact with within a grid widget.
Grid Item Layout An enum that defines the image and text style of a GridItem.
Horizontal Alignment An enum that specifies the horizontal alignment of a widget.
Horizontal Size Style An enum that sets how widgets fill the space of a column.
Host App Data Source For a Selection Input widget that uses a multiselect menu, a data source from a Google Workspace application.
Icon Predefined icons that can be used in various UI objects, such as Image Button or Decorated Text widgets.
Icon Image A predefined icon, a material design icon, or an icon from a URL with a customizable crop style.
Image A widget that shows a single image.
Image Button A Image Button with an image displayed on it.
Image Button Style An enum that specifies the style for Image Button .
Image Component An image component that can be added to grid items.
Image Crop Style A class that represents a crop style that can be applied to image components.
Image Crop Type An enum that represents the crop styles applied to image components.
Image Style An enum that defines an image cropping style.
Input Type An enum that defines the input type of the widget.
Interaction An enum type that specifies what to do in response to an interaction with a user, such as a user clicking a button in a card message.
Key Value This class is deprecated.
Link Preview Card action that displays a link preview card and smart chip in the host app.
Load Indicator An enum type that specifies the type of loading or progress indicator to display while an Action is being processed.
Material Icon An object that supports all Google Font Icons .
Navigation A helper object that controls card navigation.
Notification A notification shown to the user as a response to interacting with a UI element.
On Close An enum that specifies what to do when a URL opened through an Open Link is closed.
Open As An enum that specifies how to open a URL.
Open Link Represents an action to open a link with some options.
Overflow Menu Holds a list of Overflow Menu Item objects that are displayed in a pop-up menu.
Overflow Menu Item An Overflow Menu Item with an icon and text label.
Platform Data Source For a Selection Input widget that uses a multiselect menu, a data source from Google Workspace.
Response Type An enum that represents the type of Chat app response.
Selection Input An input field that allows choosing between a set of predefined options.
Selection Input Type The format of the items that users can select.
Status An enum that represents the status code.
Suggestions Autocomplete suggestions to supplement a Text Input widget.
Suggestions Response A response object that can be returned from a suggestions callback function.
Suggestions Response Builder A builder for Suggestions Response objects.
Switch A UI element that supports being toggled on or off.
Switch Control Type Type of a Switch widget control.
Text Button A Text Button with a text label.
Text Button Style An enum that specifies the style for Text Button .
Text Input A input field widget that accepts text input.
Text Paragraph A widget that displays text and supports basic HTML formatting .
Time Picker An input field that allows users to input a time.
Universal Action Response The response object that may be returned from a method that creates universal action.
Universal Action Response Builder A builder for the Universal Action Response objects.
Update Draft Action Response Represents an action that updates the email draft that the user is currently editing.
Update Draft Action Response Builder A builder for Update Draft Action Response objects.
Update Draft Bcc Recipients Action Updates the Bcc recipients of an email draft.
Update Draft Body Action Updates the email draft body.
Update Draft Body Type An enum value that specifies the type of an Update Draft Body Action .
Update Draft Cc Recipients Action Updates the Cc recipients of an email draft.
Update Draft Subject Action Updates the subject line of an email draft.
Update Draft To Recipients Action Updates the To recipients of an email draft.
Updated Widget The response of the updated widget.
Validation An object that defines the validation rule for the widget that it is attached to.
Vertical Alignment An enum that sets the vertical alignment of widgets in a column.
Widget Base class for all widgets that can be added to a Card .
Wrap Style An enum that sets the wrapping style for content within a column.

Action

Methods

Method Return type Brief description
Action Adds the names of the widgets that this Action needs for a valid submission.
Action Indicates whether this Action requires inputs from all widgets.
Action Sets the name of the callback function to be called.
Action Sets the interaction with a user, only required when opening a dialog.
Action Sets the loading indicator that displays while the action is in progress.
Action Allows custom parameters to be passed to the callback function.
Action Indicates whether form values are determined by the client's values or the server's values after an action response updates the form's Card .

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 Builds the current action response and validates it.
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.

Action Status

Methods

Method Return type Brief description
Action Status Represents the status for a request to either open or submit a dialog.
Action Status The message to send users about the status of their request.

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.

Authorization Action

Methods

Method Return type Brief description
Authorization Action Sets the authorization URL that user is taken to from the authorization prompt.

Authorization Exception

Methods

Method Return type Brief description
String Prints the JSON representation of this object.
Authorization Exception Sets the authorization URL that user is taken to from the authorization prompt.
Authorization Exception The name of a function to call to generate a custom authorization prompt.
Authorization Exception Sets the name that is displayed to the user when asking for authorization.
void Triggers this exception to be thrown.

Border Style

Methods

Method Return type Brief description
Border Style Sets the corner radius of the border, for example 8.
Border Style Sets the color of the border.
Border Style Sets the type of the border.

Border Type

Properties

Property Type Description
NO_BORDER
Enum No border style.
STROKE
Enum Stroke border style.

Button

Methods

Method Return type Brief description
Button Sets an authorization action that opens a URL to the authorization flow when the object is clicked.
Button Sets an action that composes a draft email when the object is clicked.
Button Sets an action that executes when the object is clicked.
Button Sets an action that opens a URL in a tab when the object is clicked.
Button Sets a URL to be opened when the object is clicked.
Button Sets a pop-up menu to be opened when the object is clicked.

Button Set

Methods

Method Return type Brief description
Button Set Adds a button.

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.

Card

Methods

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

Card Action

Methods

Method Return type Brief description
Card Action Sets an authorization action that opens a URL to the authorization flow when the object is clicked.
Card Action Sets an action that composes a draft email when the object is clicked.
Card Action Sets an action that executes when the object is clicked.
Card Action Sets an action that opens a URL in a tab when the object is clicked.
Card Action Sets a URL to be opened when the object is clicked.
Card Action Sets the menu text for this action.

Card Builder

Methods

Method Return type Brief description
Card Builder Adds a Card Action to this Card.
Card Builder Adds a section to this card.
Card Builds the current card and validates it.
Card Builder Sets the display style for this card.
Card Builder Sets a fixed footer for this card.
Card Builder Sets the header for this card.
Card Builder Sets the name for this card.
Card Builder Sets the peek card header.

Card Header

Methods

Method Return type Brief description
Card Header Sets the alternative text for the header image.
Card Header Sets the cropping of the icon in the card header.
Card Header Sets the image to use in the header by providing its URL or data string.
Card Header Sets the subtitle of the card header.
Card Header Sets the title of the card header.

Card Section

Methods

Method Return type Brief description
Card Section Adds the given widget to this section.
Card Section Sets the customizable expand and collapse buttons of the section.
Card Section Sets whether the section can be collapsed.
Card Section Sets the header of the section.
Card Section Sets the number of widgets that are still shown when this section is collapsed.

Card Service

Properties

Property Type Description
Border Type
Border Type The Border Type enumeration.
Chip List Layout
Chip List Layout The Chip List Layout enumeration.
Composed Email Type
Composed Email Type The Composed Email Type enumeration.
Content Type
Content Type The Content Type enumeration.
Grid Item Layout
Grid Item Layout The Grid Item Layout enumeration.
Horizontal Alignment
Horizontal Alignment The Horizontal Alignment enumeration.
Icon
Icon The Icon enumeration.
Image Button Style
Image Button Style The Image Button Style enumeration.
Image Crop Type
Image Crop Type The Image Crop Type enumeration.
Image Style
Image Style The Image Style enumeration.
Input Type
Input Type The Input Type enumeration.
Load Indicator
Load Indicator The Load Indicator enumeration.
On Close
On Close The On Close enumeration.
Open As
Open As The Open As enumeration.
Selection Input Type
Selection Input Type The Selection Input Type enumeration.
Text Button Style
Text Button Style The Text Button Style enumeration.
Update Draft Body Type
Update Draft Body Type The Update Draft Body Type enumeration.

Methods

Method Return type Brief description
Action Creates a new Action .
Action Response Builder Creates a new Action Response Builder .
Action Status Creates a new Action Status .
Attachment Creates a new Attachment .
Authorization Action Creates a new Authorization Action .
Authorization Exception Creates a new Authorization Exception .
Border Style Creates a new Border Style .
Button Set Creates a new Button Set .
Calendar Event Action Response Builder Creates a new Calendar Event Action Response Builder .
Card Action Creates a new Card Action .
Card Builder Creates a new Card builder.
Card Header Creates a new Card Header .
Card Section Creates a new Card Section .
Card With Id Creates a new Card With Id .
Carousel Creates a Carousel .
Carousel Card Creates a new Carousel Card .
Chat Action Response Creates a new Chat Action Response .
Chat Response Builder Creates a new Chat Response Builder .
Chip Creates a new Chip .
Chip List Creates a new Chip List .
Collapse Control Creates a new Collapse Control .
Column Creates a new Column .
Columns Creates a new set of Columns .
Compose Action Response Builder Creates a new Compose Action Response Builder .
Date Picker Creates a new Date Picker .
Date Time Picker Creates a new Date Time Picker .
Decorated Text Creates a new Decorated Text .
Dialog Creates a new Dialog .
Dialog Action Creates a new Dialog Action .
Divider Creates a new Divider .
Drive Items Selected Action Response Builder Creates a new Drive Items Selected Action Response Builder .
Editor File Scope Action Response Builder Creates a new Editor File Scope Action Response Builder .
Fixed Footer Creates a new Fixed Footer .
Grid Creates a new Grid .
Grid Item Creates a new Grid Item .
Icon Image Creates a new Icon Image .
Image Creates a new Image .
Image Button Creates a new Image Button .
Image Component Creates a new Image Component .
Image Crop Style Creates a new Image Crop Style .
Key Value Creates a new Key Value .
Link Preview Creates a new Link Preview .
Material Icon Creates a new Material Icon .
Navigation Creates a new Navigation .
Notification Creates a new Notification .
Open Link Creates a new Open Link .
Overflow Menu Creates a new Overflow Menu .
Overflow Menu Item Creates a new Overflow Menu Item .
Selection Input Creates a new Selection Input .
Suggestions Creates a new Suggestions .
Suggestions Response Builder Creates a new Suggestions Response Builder .
Switch Creates a new Switch .
Text Button Creates a new Text Button .
Text Input Creates a new Text Input .
Text Paragraph Creates a new Text Paragraph .
Time Picker Creates a new Time Picker .
Universal Action Response Builder Creates a new Universal Action Response Builder .
Update Draft Action Response Builder Creates a new Update Draft Action Response Builder .
Update Draft Bcc Recipients Action Creates a new Update Draft Bcc Recipients Action ;
Update Draft Body Action Creates a new Update Draft Body Action .
Update Draft Cc Recipients Action Creates a new Update Draft Cc Recipients Action .
Update Draft Subject Action Creates a new Update Draft Subject Action .
Update Draft To Recipients Action Creates a new Update Draft To Recipients Action .
Validation Creates a new Validation .

Card With Id

Methods

Method Return type Brief description
Card With Id Sets the card of the card With Id .
Card With Id Sets the unique card ID of the card With Id .

Methods

Method Return type Brief description
Carousel Adds a carousel card.

Carousel Card

Methods

Method Return type Brief description
Carousel Card Adds the given widget to the footer of this carousel card.
Carousel Card Adds the given widget to this carousel card.

Chat Action Response

Methods

Method Return type Brief description
Chat Action Response Sets the dialog action to an event related to a dialog.
Chat Action Response The type of Chat app response.
Chat Action Response Sets the updated widget, used to provide autocomplete options for a widget.
Chat Action Response The URL for users to authenticate or configure.

Chat Client Data Source

Methods

Method Return type Brief description
Chat Client Data Source A data source that populates Google Chat spaces as selection items for a multiselect menu.

Chat Response

Methods

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

Chat Response Builder

Methods

Method Return type Brief description
Chat Response Builder Sets the card field of the message.
Chat Response Builds the current action response and validates it.
Chat Response Builder Sets the action response field of the message.
Chat Response Builder Sets the text of the Chat message.

Chat Space Data Source

Methods

Method Return type Brief description
Chat Space Data Source If set to true , the multi select menu selects the current Google Chat space as an item by default.

Chip

Methods

Method Return type Brief description
Chip Sets the alternative text of the chip for accessibility.
Chip Sets an authorization action that opens a URL to the authorization flow when the object is clicked.
Chip Sets an action that composes a draft email when the object is clicked.
Chip Sets whether the chip is disabled.
Chip Sets the icon to be used as the chip.
Chip Sets the title of the chip.
Chip Sets an action that executes when the object is clicked.
Chip Sets an action that opens a URL in a tab when the object is clicked.
Chip Sets a URL to be opened when the object is clicked.

Chip List

Methods

Method Return type Brief description
Chip List Adds a chip.
Chip List Sets the chip list layout.

Chip List Layout

Properties

Property Type Description
WRAPPED
Enum The chip list wraps to the next line if there isn't enough horizontal space.
HORIZONTAL_SCROLLABLE
Enum The chips scroll horizontally if they don't fit in the available space.

Collapse Control

Methods

Method Return type Brief description
Collapse Control Sets the Button that is displayed for "show less" button.
Collapse Control Sets the Button that is displayed for "show more" button.
Collapse Control Sets the Horizontal Alignment of the Collapse Control .

Column

Columns

Methods

Method Return type Brief description
Columns Adds a Column to the Columns widget.
Columns Sets the wrap style of the columns, controls how the column resizes based on screen width.

Common Data Source

Properties

Property Type Description
UNKNOWN
Enum Default value.
USER
Enum Google Workspace users.

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.

Date Picker

Methods

Method Return type Brief description
Date Picker Sets the field name that identifies this picker in the event object that is generated when there is a UI interaction.
Date Picker Sets an Action that the script performs whenever the picker input changes.
Date Picker Sets the title displayed above the input field.
Date Picker Sets the prefilled value to be set in the input field.
Date Picker Sets the prefilled value to be set in the input field.

Date Time Picker

Methods

Method Return type Brief description
Date Time Picker Sets the field name that identifies this picker in the event object that is generated when there is a UI interaction.
Date Time Picker Sets an Action that the script performs whenever the picker input changes.
Date Time Picker Sets the number of minutes that the time zone should be offset from UTC.
Date Time Picker Sets the title displayed above the input field.
Date Time Picker Sets the prefilled value to be set in the input field.
Date Time Picker Sets the prefilled value to be set in the input field.

Decorated Text

Methods

Method Return type Brief description
Decorated Text Sets an authorization action that opens a URL to the authorization flow when the object is clicked.
Decorated Text Sets the label text to be used as the key and is displayed below the text content.
Decorated Text Sets the Button that is displayed to the right of the text.
Decorated Text Sets an action that composes a draft email when the object is clicked.
Decorated Text Sets the optional Icon Image that is displayed to the right of the content.
Decorated Text Sets an action that executes when the object is clicked.
Decorated Text Sets an action that opens a URL in a tab when the object is clicked.
Decorated Text Sets a URL to be opened when the object is clicked.
Decorated Text Sets the optional Icon Image to display before the text content.
Decorated Text Sets the Switch that is displayed to the right of the content.
Decorated Text Sets the text to be used as the value.
Decorated Text Sets the label text to be used as the key and is displayed above the text content.
Decorated Text Sets whether the value text should be displayed on a single line or multiple lines.

Dialog

Methods

Method Return type Brief description
Dialog Sets the card of the Dialog .

Dialog Action

Methods

Method Return type Brief description
Dialog Action Sets the action status of Dialog Action .
Dialog Action Sets the dialog of the Dialog Action .

Display Style

Properties

Property Type Description
PEEK
Enum Show the card header at the bottom of add-on content over existing content.
REPLACE
Enum Show the card by replacing existing content.

Divider

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.

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.

Fixed Footer

Methods

Method Return type Brief description
Fixed Footer Set the primary button in the fixed footer.
Fixed Footer Set the secondary button in the fixed footer.

Grid

Methods

Method Return type Brief description
Grid Adds a new grid item to the grid.
Grid Sets an authorization action that opens a URL to the authorization flow when the object is clicked.
Grid Sets the border style applied to each grid item.
Grid Sets an action that composes a draft email when the object is clicked.
Grid The number of columns to display in the grid.
Grid Sets an action that executes when the object is clicked.
Grid Sets an action that opens a URL in a tab when the object is clicked.
Grid Sets a URL to be opened when the object is clicked.
Grid Sets the title text of the grid.

Grid Item

Methods

Method Return type Brief description
Grid Item Sets the identifier for the grid item.
Grid Item Sets the image for this grid item.
Grid Item Sets the layout of text and image for the grid item.
Grid Item Sets the subtitle of the grid item.
Grid Item Sets the horizontal alignment of the grid item.
Grid Item Sets the title text of the grid item.

Grid Item Layout

Properties

Property Type Description
TEXT_BELOW
Enum The title and subtitle are shown below the grid item's image.
TEXT_ABOVE
Enum The title and subtitle are shown above the grid item's image.

Horizontal Alignment

Properties

Property Type Description
START
Enum Align the widget to the start of the sentence side.
CENTER
Enum Align the widget to the center.
END
Enum Align the widget to the end of the sentence side.

Horizontal Size Style

Properties

Property Type Description
FILL_AVAILABLE_SPACE
Enum Sizes the Widget to fill the available horizontal space of a Column .
FILL_MINIMUM_SPACE
Enum Resizes the Widget to fill the least amount of horizontal space in a Column .

Host App Data Source

Methods

Method Return type Brief description
Host App Data Source Sets the data source from Google Chat.

Icon

Properties

Property Type Description
NONE
Enum No icon.
AIRPLANE
Enum Airplane flight icon
BOOKMARK
Enum Bookmark icon
BUS
Enum Bus icon
CAR
Enum Car icon
CLOCK
Enum Clock icon
CONFIRMATION_NUMBER_ICON
Enum Confirmation number icon
DOLLAR
Enum Dollar icon
DESCRIPTION
Enum Description icon
EMAIL
Enum Email icon
EVENT_PERFORMER
Enum Email icon
EVENT_SEAT
Enum Event seat icon
FLIGHT_ARRIVAL
Enum Flight arrival icon
FLIGHT_DEPARTURE
Enum Flight departure icon
HOTEL
Enum Hotel icon
HOTEL_ROOM_TYPE
Enum Hotel icon
INVITE
Enum Invite icon
MAP_PIN
Enum Map pin icon
MEMBERSHIP
Enum Membershipt icon
MULTIPLE_PEOPLE
Enum Multiple people icon
OFFER
Enum Offer icon
PERSON
Enum Person icon
PHONE
Enum Phone icon
RESTAURANT_ICON
Enum Restaurant icon
SHOPPING_CART
Enum Shopping cart icon
STAR
Enum Star icon
STORE
Enum Store icon
TICKET
Enum Ticket icon
TRAIN
Enum Train icon
VIDEO_CAMERA
Enum Video camera icon
VIDEO_PLAY
Enum Video play icon

Icon Image

Methods

Method Return type Brief description
Icon Image Sets the alternative text of the URL which is used for accessibility.
Icon Image Sets the predefined icon if the URL is not set.
Icon Image Sets the URL of the icon if the icon is not set.
Icon Image Sets the crop style for the image.
Icon Image Sets the material design icon.

Image

Methods

Method Return type Brief description
Image Sets the alternative text of the image for accessibility.
Image Sets an authorization action that opens a URL to the authorization flow when the object is clicked.
Image Sets an action that composes a draft email when the object is clicked.
Image Sets the image to use by providing its URL or data string.
Image Sets an action that executes when the object is clicked.
Image Sets an action that opens a URL in a tab when the object is clicked.
Image Sets a URL to be opened when the object is clicked.

Image Button

Methods

Method Return type Brief description
Image Button Sets the alternative text of the button for accessibility.
Image Button Sets an authorization action that opens a URL to the authorization flow when the object is clicked.
Image Button Sets an action that composes a draft email when the object is clicked.
Image Button Sets a predefined Icon to display on the button.
Image Button Sets the URL of an image to use as this button's icon.
Image Button Sets the button style.
Image Button Sets the material design icon.
Image Button Sets an action that executes when the object is clicked.
Image Button Sets an action that opens a URL in a tab when the object is clicked.
Image Button Sets a URL to be opened when the object is clicked.
Image Button Sets a pop-up menu to be opened when the object is clicked.

Image Button Style

Properties

Property Type Description
BORDERLESS
Enum Image button with no border.
OUTLINED
Enum Image button with clear background.
FILLED
Enum Image button with colored background.
FILLED_TONAL
Enum Image button with an alternative middle ground between filled and outlined buttons.

Image Component

Methods

Method Return type Brief description
Image Component Sets the alternative text of the image.
Image Component Sets the border style applied to the image.
Image Component Sets the crop style for the image.
Image Component Sets the URL of the image.

Image Crop Style

Methods

Method Return type Brief description
Image Crop Style Sets the aspect ratio to use if the crop type is RECTANGLE_CUSTOM .
Image Crop Style Sets the crop type for the image.

Image Crop Type

Properties

Property Type Description
SQUARE
Enum Square shape crop style.
CIRCLE
Enum Circle shape crop style.
RECTANGLE_CUSTOM
Enum Rectangle shape crop style with custom ratio.
RECTANGLE_4_3
Enum Rectangle shape crop style with 4:3 ratio.

Image Style

Properties

Property Type Description
SQUARE
Enum No cropping.
CIRCLE
Enum Crop to a circle shape.

Input Type

Properties

Property Type Description
TEXT
Enum Accept regular text.
INTEGER
Enum Accept an integer.
FLOAT
Enum Accept a floating-point number.
EMAIL
Enum Accept an email address.

Interaction

Properties

Property Type Description
INTERACTION_UNSPECIFIED
Enum Default value.
OPEN_DIALOG
Enum Opens a dialog, a card-based interface that Chat apps use to interact with users.

Key Value

Methods

Method Return type Brief description
Key Value Sets an authorization action that opens a URL to the authorization flow when the object is clicked.
Key Value Sets an action that composes a draft email when the object is clicked.
Key Value Sets an action that executes when the object is clicked.
Key Value Sets an action that opens a URL in a tab when the object is clicked.
Key Value Sets a URL to be opened when the object is clicked.

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.

Load Indicator

Properties

Property Type Description
SPINNER
Enum Use a spinner indicator.
NONE
Enum Do not use an indicator.

Material Icon

Methods

Method Return type Brief description
Material Icon Whether the icon renders as filled.
Material Icon Weight and grade affect a symbol’s thickness.
Material Icon Sets the name of the icon.
Material Icon The stroke weight of the icon.

Methods

Method Return type Brief description
Navigation Pops a card from the navigation stack.
Navigation Pops to the specified card by its card name.
Navigation Pops the card stack to the root card.
String Prints the JSON representation of this object.
Navigation Pushes the given card onto the stack.
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.

Overflow Menu

Methods

Method Return type Brief description
Overflow Menu Adds a menu item.

Overflow Menu Item

Methods

Method Return type Brief description
Overflow Menu Item Sets an authorization action that opens a URL to the authorization flow when the object is clicked.
Overflow Menu Item Sets an action that composes a draft email when the object is clicked.
Overflow Menu Item Sets whether the menu item is disabled.
Overflow Menu Item Sets an action that executes when the object is clicked.
Overflow Menu Item Sets an action that opens a URL in a tab when the object is clicked.
Overflow Menu Item Sets a URL to be opened when the object is clicked.
Overflow Menu Item Sets the menu item's leading icon.
Overflow Menu Item Sets the title of the menu item.

Platform Data Source

Methods

Method Return type Brief description
Platform Data Source Sets the data source from Google Workspace.
Platform Data Source Used to populate spaces in multiselect menu.

Response Type

Properties

Property Type Description
TYPE_UNSPECIFIED
Enum Default type that's handled as NEW_MESSAGE .
NEW_MESSAGE
Enum Post as a new message in the topic.
UPDATE_MESSAGE
Enum Update the Chat app's message.
UPDATE_USER_MESSAGE_CARDS
Enum Update the cards on a user's message.
REQUEST_CONFIG
Enum Privately ask the user for additional authentication or configuration.
DIALOG
Enum Presents a dialog.
UPDATE_WIDGET
Enum Widget text autocomplete options query.

Selection Input

Methods

Method Return type Brief description
Selection Input Adds a new item that can be selected.
Selection Input Adds a new item that can be selected, for multi-select menus.
Selection Input Sets external data source, such as a relational data base.
Selection Input Sets the key that identifies this selection input in the event object that is generated when there is a UI interaction.
Selection Input Sets the maximum number of items that a user can select.
Selection Input Sets the number of text characters that a user inputs before the app queries autocomplete and displays suggested items on the card.
Selection Input Sets an Action to be performed whenever the selection input changes.
Selection Input Sets a data source from Google Workspace.
Selection Input Sets the title to be shown ahead of the input field.
Selection Input Sets the type of this input.

Selection Input Type

Properties

Property Type Description
CHECK_BOX
Enum Checkbox input style.
RADIO_BUTTON
Enum Radio button input style.
DROPDOWN
Enum Dropdown menu selection input style.
SWITCH
Enum A set of switches.
MULTI_SELECT
Enum A multiselect menu for static or dynamic data.

Status

Properties

Property Type Description
OK
Enum HTTP Mapping: 200 OK
CANCELLED
Enum HTTP Mapping: 499 Client Closed Request
UNKNOWN
Enum Unknown error.
INVALID_ARGUMENT
Enum The client specified an invalid argument.
DEADLINE_EXCEEDED
Enum HTTP Mapping: 504 Gateway Timeout
NOT_FOUND
Enum HTTP Mapping: 404 Not Found
ALREADY_EXISTS
Enum The entity that a client attempted to create already exists.
PERMISSION_DENIED
Enum HTTP Mapping: 403 Forbidden
UNAUTHENTICATED
Enum HTTP Mapping: 401 Unauthorized
RESOURCE_EXHAUSTED
Enum HTTP Mapping: 429 Too Many Requests
FAILED_PRECONDITION
Enum The operation was rejected because the system is not in a state required for the operation's execution.
ABORTED
Enum The operation was aborted, typically due to a concurrency issue such as a sequencer check failure or transaction abort.
OUT_OF_RANGE
Enum The operation was attempted past the valid range.
UNIMPLEMENTED
Enum HTTP Mapping: 501 Not Implemented
INTERNAL
Enum Internal errors.
UNAVAILABLE
Enum HTTP Mapping: 503 Service Unavailable
DATA_LOSS
Enum Unrecoverable data loss or corruption.

Suggestions

Methods

Method Return type Brief description
Suggestions Add a text suggestion.
Suggestions Add a list of text suggestions.

Suggestions Response

Methods

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

Suggestions Response Builder

Methods

Method Return type Brief description
Suggestions Response Builds the current suggestions response and validates it.
Suggestions Response Builder Sets the suggestions used in auto complete in text fields.

Switch

Methods

Method Return type Brief description
Switch Sets the control type of the switch.
Switch Sets the key that identifies this switch in the event object that is generated when there is a UI interaction.
Switch Sets the action to take when the switch is toggled.
Switch Sets whether this switch should start as selected or unselected.
Switch Sets the value that is sent as the form input when this switch is toggled on.

Switch Control Type

Properties

Property Type Description
SWITCH
Enum Toggle-styled control for a switch widget.
CHECK_BOX
Enum Checkbox-styled control for a switch widget.

Text Button

Methods

Method Return type Brief description
Text Button Sets the alternative text of the button for accessibility.
Text Button Sets an authorization action that opens a URL to the authorization flow when the object is clicked.
Text Button Sets the background color for Text Button Style.FILLED button.
Text Button Sets an action that composes a draft email when the object is clicked.
Text Button Sets whether the button is disabled.
Text Button Sets a predefined Icon to display on the button.
Text Button Sets the URL of an image to use as this button's icon.
Text Button Sets the material design icon.
Text Button Sets an action that executes when the object is clicked.
Text Button Sets an action that opens a URL in a tab when the object is clicked.
Text Button Sets a URL to be opened when the object is clicked.
Text Button Sets a pop-up menu to be opened when the object is clicked.
Text Button Sets the text that displays on the button.
Text Button Sets the button style.

Text Button Style

Properties

Property Type Description
OUTLINED
Enum Normal text button with clear background.
TEXT
Enum DO NOT USE.
FILLED
Enum Text button with colored background.
FILLED_TONAL
Enum Normal text button with an alternative middle ground between filled and outlined buttons.
BORDERLESS
Enum Normal text button with no border.

Text Input

Methods

Method Return type Brief description
Text Input Sets the key that identifies this text input in the event object that is generated when there is a UI interaction.
Text Input Sets a hint for the text input.
Text Input Sets whether the input text shows on one line or multiple lines.
Text Input Sets an action to be performed whenever the text input changes.
Text Input Sets the suggestions for autocompletion in the text field.
Text Input Sets the callback action to fetch suggestions based on user input for autocompletion.
Text Input Sets the title to be shown above the input field.
Text Input Sets the validation rule for this widget.
Text Input Sets the pre-filled value to be set in the input field.

Text Paragraph

Methods

Method Return type Brief description
Text Paragraph Sets the maximum number of lines of text that are displayed in the widget.
Text Paragraph Sets the text of the paragraph.

Time Picker

Methods

Method Return type Brief description
Time Picker Sets the field name that identifies this picker in the event object that is generated when there is a UI interaction.
Time Picker Sets the prefilled hours value to set in the input field.
Time Picker Sets the prefilled minutes value to set in the input field.
Time Picker Sets an Action that the script performs whenever the picker input changes.
Time Picker Sets the title displayed above the input field.

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

Updated Widget

Methods

Method Return type Brief description
Updated Widget Adds a new item that can be selected.

Validation

Methods

Method Return type Brief description
Validation Sets the character limit of the widget.
Validation Sets the input type of the widget.

Vertical Alignment

Properties

Property Type Description
CENTER
Enum Vertically places the content at the center of the container.
TOP
Enum Vertically places the content at the top of the container.
BOTTOM
Enum Vertically places the content at the bottom of the container.

Widget

Wrap Style

Properties

Property Type Description
NOWRAP
Enum No wrapping.
WRAP
Enum Wraps the content for any widgets in a column.
Design a Mobile Site
View Site in Mobile | Classic
Share by: