Class CardService

  • CardService allows you to create generic cards for use in various Google extensibility products like Google Workspace add-ons.

  • You can return single or multiple cards using the CardService.

  • Cards can be built with headers, text, images, and interactive elements like menu items.

  • CardService provides numerous methods for creating different card components such as buttons, sections, and input fields.

CardService

CardService provides the ability to create generic cards used across different Googleextensibility products, such asGoogle Workspace add-ons.

Below is a sample for an add-ons card.

functioncreateCard(){returnCardService.newCardBuilder().setHeader(CardService.newCardHeader().setTitle('CardTitle')).build();}

Or you can return multiple Cards like so:

functioncreateCards(){return[CardService.newCardBuilder().build(),CardService.newCardBuilder().build(),CardService.newCardBuilder().build(),];}

The following shows how you could define a card with a header, text, an image and a menu item:

functioncreateWidgetDemoCard(){returnCardService.newCardBuilder().setHeader(CardService.newCardHeader().setTitle('Widget demonstration').setSubtitle('Check out these widgets').setImageStyle(CardService.ImageStyle.SQUARE).setImageUrl('https://www.example.com/images/headerImage.png'),).addSection(CardService.newCardSection().setHeader('Simple widgets')// optional.addWidget(CardService.newTextParagraph().setText('These widgets are display-only. '+'A text paragraph can have multiple lines and '+'formatting.',),).addWidget(CardService.newImage().setImageUrl('https://www.example.com/images/mapsImage.png',),),).addCardAction(CardService.newCardAction().setText('Gmail').setOpenLink(CardService.newOpenLink().setUrl('https://mail.google.com/mail'),),).build();}

Sample for a Chat Apps card.

constcardHeader=CardService.newCardHeader().setTitle('Sasha').setSubtitle('Software Engineer').setImageUrl('https://developers.google.com/chat/images/quickstart-app-avatar.png',).setImageStyle(CardService.ImageStyle.CIRCLE).setImageAltText('Avatar for Sasha');constcardSection=CardService.newCardSection().setHeader('Contact Info').setCollapsible(true).setNumUncollapsibleWidgets(1).addWidget(CardService.newDecoratedText().setStartIcon(CardService.newIconImage().setIcon(CardService.Icon.EMAIL)).setText('sasha@example.com'),).addWidget(CardService.newDecoratedText().setStartIcon(CardService.newIconImage().setIcon(CardService.Icon.PERSON)).setText('<font color="#80e27e">Online</font>'),).addWidget(CardService.newDecoratedText().setStartIcon(CardService.newIconImage().setIcon(CardService.Icon.PHONE)).setText('+1 (555) 555-1234'),).addWidget(CardService.newButtonSet().addButton(CardService.newTextButton().setText('Share').setOpenLink(CardService.newOpenLink().setUrl('https://example.com/share'),),).addButton(CardService.newTextButton().setText('Edit').setOnClickAction(CardService.newAction().setFunctionName('goToView').setParameters({viewType:'EDIT'}),),),);constcard=CardService.newCardBuilder().setHeader(cardHeader).addSection(cardSection).build();

Properties

PropertyTypeDescription
BorderTypeBorderTypeTheBorderType enumeration.
ChipListLayoutChipListLayoutTheChipListLayout enumeration.
CommonDataSourceCommonDataSourceTheCommonDataSource enumeration.
ComposedEmailTypeComposedEmailTypeTheComposedEmailType enumeration.
ContentTypeContentTypeTheContentType enumeration.
DriveItemTypeDriveItemTypeTheDriveItemType enumeration.
ExpressionDataActionTypeExpressionDataActionTypeTheExpressionDataActionType enumeration.
ExpressionDataConditionTypeExpressionDataConditionTypeTheExpressionDataConditionType enumeration.
GridItemLayoutGridItemLayoutTheGridItemLayout enumeration.
HorizontalAlignmentHorizontalAlignmentTheHorizontalAlignment enumeration.
IconIconTheIcon enumeration.
ImageButtonStyleImageButtonStyleTheImageButtonStyle enumeration.
ImageCropTypeImageCropTypeTheImageCropType enumeration.
ImageStyleImageStyleTheImageStyle enumeration.
InputTypeInputTypeTheInputType enumeration.
LoadIndicatorLoadIndicatorTheLoadIndicator enumeration.
OnCloseOnCloseTheOnClose enumeration.
OpenAsOpenAsTheOpenAs enumeration.
SelectionInputTypeSelectionInputTypeTheSelectionInputType enumeration.
TextButtonStyleTextButtonStyleTheTextButtonStyle enumeration.
TextInputModeTextInputModeTheTextInputMode enumeration.
UpdateDraftBodyTypeUpdateDraftBodyTypeTheUpdateDraftBodyType enumeration.
VariableButtonSizeVariableButtonSizeTheVariableButtonSize enumeration.
VisibilityVisibilityTheVisibility enumeration.
WorkflowDataSourceTypeWorkflowDataSourceTypeTheWorkflowDataSourceType enumeration.

Methods

MethodReturn typeBrief description
newAction()ActionCreates a newAction.
newActionResponseBuilder()ActionResponseBuilderCreates a newActionResponseBuilder.
newActionStatus()ActionStatusCreates a newActionStatus.
newAttachment()AttachmentCreates a newAttachment.
newAuthorizationAction()AuthorizationActionCreates a newAuthorizationAction.
newAuthorizationException()AuthorizationExceptionCreates a newAuthorizationException.
newBorderStyle()BorderStyleCreates a newBorderStyle.
newButtonSet()ButtonSetCreates a newButtonSet.
newCalendarEventActionResponseBuilder()CalendarEventActionResponseBuilderCreates a newCalendarEventActionResponseBuilder.
newCardAction()CardActionCreates a newCardAction.
newCardBuilder()CardBuilderCreates a new Card builder.
newCardHeader()CardHeaderCreates a newCardHeader.
newCardSection()CardSectionCreates a newCardSection.
newCardWithId()CardWithIdCreates a newCardWithId.
newCarousel()CarouselCreates aCarousel.
newCarouselCard()CarouselCardCreates a newCarouselCard.
newChatActionResponse()ChatActionResponseCreates a newChatActionResponse.
newChatResponseBuilder()ChatResponseBuilderCreates a newChatResponseBuilder.
newChip()ChipCreates a newChip.
newChipList()ChipListCreates a newChipList.
newCollapseControl()CollapseControlCreates a newCollapseControl.
newColumn()ColumnCreates a newColumn.
newColumns()ColumnsCreates a new set ofColumns.
newCommonWidgetAction()CommonWidgetActionCreates a newCommonWidgetAction.
newComposeActionResponseBuilder()ComposeActionResponseBuilderCreates a newComposeActionResponseBuilder.
newCondition()ConditionCreates a newCondition used for client-side validation.
newDataSourceConfig()DataSourceConfigCreates a new, emptyDataSourceConfig.
newDatePicker()DatePickerCreates a newDatePicker.
newDateTimePicker()DateTimePickerCreates a newDateTimePicker.
newDecoratedText()DecoratedTextCreates a newDecoratedText.
newDialog()DialogCreates a newDialog.
newDialogAction()DialogActionCreates a newDialogAction.
newDivider()DividerCreates a newDivider.
newDriveDataSourceSpec()DriveDataSourceSpecCreates a newDriveDataSourceSpec.
newDriveItemsSelectedActionResponseBuilder()DriveItemsSelectedActionResponseBuilderCreates a newDriveItemsSelectedActionResponseBuilder.
newEditorFileScopeActionResponseBuilder()EditorFileScopeActionResponseBuilderCreates a newEditorFileScopeActionResponseBuilder.
newEventAction()EventActionCreates a newEventAction used for client-side validation.
newExpressionData()ExpressionDataCreates a newExpressionData used for client-side validation.
newExpressionDataAction()ExpressionDataActionCreates a newExpressionDataAction used for client-side validation.
newExpressionDataCondition()ExpressionDataConditionCreates a newExpressionDataCondition used for client-side validation.
newFixedFooter()FixedFooterCreates a newFixedFooter.
newGrid()GridCreates a newGrid.
newGridItem()GridItemCreates a newGridItem.
newHostAppDataSource()HostAppDataSourceCreates a newHostAppDataSource.
newIconImage()IconImageCreates a newIconImage.
newImage()ImageCreates a newImage.
newImageButton()ImageButtonCreates a newImageButton.
newImageComponent()ImageComponentCreates a newImageComponent.
newImageCropStyle()ImageCropStyleCreates a newImageCropStyle.
newKeyValue()KeyValueCreates a newKeyValue.
newLinkPreview()LinkPreviewCreates a newLinkPreview.
newMaterialIcon()MaterialIconCreates a newMaterialIcon.
newNavigation()NavigationCreates a newNavigation.
newNotification()NotificationCreates a newNotification.
newOpenLink()OpenLinkCreates a newOpenLink.
newOverflowMenu()OverflowMenuCreates a newOverflowMenu.
newOverflowMenuItem()OverflowMenuItemCreates a newOverflowMenuItem.
newPlatformDataSource()PlatformDataSourceCreates a newPlatformDataSource.
newSelectionInput()SelectionInputCreates a newSelectionInput.
newSuggestions()SuggestionsCreates a newSuggestions.
newSuggestionsResponseBuilder()SuggestionsResponseBuilderCreates a newSuggestionsResponseBuilder.
newSwitch()SwitchCreates a newSwitch.
newTextButton()TextButtonCreates a newTextButton.
newTextInput()TextInputCreates a newTextInput.
newTextParagraph()TextParagraphCreates a newTextParagraph.
newTimePicker()TimePickerCreates a newTimePicker.
newTrigger()TriggerCreates and returns a newTrigger used for client-side validation.
newUniversalActionResponseBuilder()UniversalActionResponseBuilderCreates a newUniversalActionResponseBuilder.
newUpdateDraftActionResponseBuilder()UpdateDraftActionResponseBuilderCreates a newUpdateDraftActionResponseBuilder.
newUpdateDraftBccRecipientsAction()UpdateDraftBccRecipientsActionCreates a newUpdateDraftBccRecipientsAction;
newUpdateDraftBodyAction()UpdateDraftBodyActionCreates a newUpdateDraftBodyAction.
newUpdateDraftCcRecipientsAction()UpdateDraftCcRecipientsActionCreates a newUpdateDraftCcRecipientsAction.
newUpdateDraftSubjectAction()UpdateDraftSubjectActionCreates a newUpdateDraftSubjectAction.
newUpdateDraftToRecipientsAction()UpdateDraftToRecipientsActionCreates a newUpdateDraftToRecipientsAction.
newUpdateVisibilityAction()UpdateVisibilityActionCreates a newUpdateVisibilityAction.
newValidation()ValidationCreates a newValidation.
newWorkflowDataSource()WorkflowDataSourceCreates a newWorkflowDataSource.

Detailed documentation

newAction()

Creates a newAction.

Return

Action — An empty Action.


newActionResponseBuilder()

Creates a newActionResponseBuilder.

Return

ActionResponseBuilder — An empty ActionResponse builder.


newActionStatus()

Creates a newActionStatus.

Only available for Google Chat apps. Not available for Google Workspace add-ons.

constactionStatus=CardService.newActionStatus().setStatusCode(CardService.Status.OK).setUserFacingMessage('Success');

Return

ActionStatus — An empty ActionStatus.


newAttachment()

Creates a newAttachment.

Return

Attachment — An empty attachment.


newAuthorizationAction()

Creates a newAuthorizationAction.

Return

AuthorizationAction — An empty AuthorizationAction.


newAuthorizationException()

Creates a newAuthorizationException.

Return

AuthorizationException — An empty AuthorizationException.


newBorderStyle()

Creates a newBorderStyle.

Return

BorderStyle — An empty BorderStyle.


newButtonSet()

Creates a newButtonSet.

Return

ButtonSet — An empty ButtonSet.


newCalendarEventActionResponseBuilder()


newCardAction()

Creates a newCardAction.

Return

CardAction — An empty CardAction.


newCardBuilder()

Creates a new Card builder.

Return

CardBuilder — An empty Card builder.


newCardHeader()

Creates a newCardHeader.

Return

CardHeader — An empty CardHeader.


newCardSection()

Creates a newCardSection.

Return

CardSection — An empty CardSection.


newCardWithId()

Creates a newCardWithId. This is used to send a card in a Google Chat message. card IDis a unique identifier for a card in a message when sending multiple cards.

Only available for Google Chat apps. Not available for Google Workspace add-ons.

constcardSection=CardService.newCardSection();cardSection.addWidget(CardService.newTextParagraph().setText('This is a text paragraph widget.'),);constcard=CardService.newCardBuilder().setHeader(CardService.newCardHeader().setTitle('Card title')).addSection(cardSection).build();constcardWithId=CardService.newCardWithId().setCardId('card_id').setCard(card);

Return

CardWithId — An emptyCardWithId.


newCarousel()

Creates aCarousel.

constcarousel=CardService.newCarousel().addCarouselCard(CardService.newCarouselCard().addWidget(CardService.newTextParagraph().setText('The first text paragraph in carousel'))).addCarouselCard(CardService.newCarouselCard().addWidget(CardService.newTextParagraph().setText('The second text paragraph in carousel'))).addCarouselCard(CardService.newCarouselCard().addWidget(CardService.newTextParagraph().setText('The third text paragraph in carousel')))

Developer Preview: Available as part of theGoogle Workspace Developer Preview Program, which grants early access to certain features.

Return

Carousel — An empty Carousel.


newCarouselCard()

Creates a newCarouselCard.

constcarouselCard=CardService.newCarouselCard().addWidget(CardService.newTextParagraph().setText('Text paragraph in carousel'));

Developer Preview: Available as part of theGoogle Workspace Developer Preview Program, which grants early access to certain features.

Return

CarouselCard — An empty Chip.


newChatActionResponse()

Creates a newChatActionResponse.

Only available for Google Chat apps. Not available for Google Workspace add-ons.

constcard=CardService.newCardBuilder().setHeader(CardService.newCardHeader().setTitle('Card title')).build();constdialog=CardService.newDialog().setBody(card);constdialogAction=CardService.newDialogAction().setDialog(dialog);constchatActionResponse=CardService.newChatActionResponse().setResponseType(CardService.ResponseType.DIALOG).setDialogAction(dialogAction);

Return

ChatActionResponse — An emptyChatActionResponse.


newChatResponseBuilder()

Creates a newChatResponseBuilder.

Only available for Google Chat apps. Not available for Google Workspace add-ons.

constcardSection=CardService.newCardSection();cardSection.addWidget(CardService.newTextParagraph().setText('This is a text paragraph widget.'),);constcard=CardService.newCardBuilder().setHeader(CardService.newCardHeader().setTitle('Card title')).addSection(cardSection).build();constcardWithId=CardService.newCardWithId().setCardId('card_id').setCard(card);constchatResponse=CardService.newChatResponseBuilder().addCardsV2(cardWithId).build();

Return

ChatResponseBuilder — An empty ChatResponseBuilder.


newChip()

Creates a newChip.

Available for Google Chat apps. In developer preview for Google Workspace add-ons.

Developer Preview: Available as part of theGoogle Workspace Developer Preview Program, which grants early access to certain features.

constchip=CardService.newChip().setLabel('Open Link').setOpenLink(CardService.newOpenLink().setUrl('https://www.google.com'));

Return

Chip — An empty Chip.


newChipList()

Creates a newChipList.

Available for Google Chat apps. In developer preview for Google Workspace add-ons.

Developer Preview: Available as part of theGoogle Workspace Developer Preview Program, which grants early access to certain features.

constchip=CardService.newChip();// Finish building the text chip...constchipList=CardService.newChipList().setLayout(CardService.ChipListLayout.WRAPPED).addChip(chip);

Return

ChipList — An empty ChipList.


newCollapseControl()

Creates a newCollapseControl.

Available for Google Chat apps. In developer preview for Google Workspace add-ons.

Developer Preview: Available as part of theGoogle Workspace Developer Preview Program, which grants early access to certain features.

constcollapseControl=CardService.newCollapseControl().setHorizontalAlign(CardService.HorizontalAlignment.START).setExpandButton(CardService.newTextButton().setText('Expand')).setCollapseButton(CardService.newTextButton().setText('Collapse'));

Return

CollapseControl — An empty CollapseControl.


newColumn()

Creates a newColumn.

Available for Google Chat apps and Google Workspace add-ons.

constcolumnWidget=CardService.newTextParagraph();constcolumn=CardService.newColumn().setHorizontalSizeStyle(CardService.HorizontalSizeStyle.FILL_AVAILABLE_SPACE).setHorizontalAlignment(CardService.HorizontalAlignment.CENTER).setVerticalAlignment(CardService.VerticalAlignment.CENTER).addWidget(columnWidget);

Return

Column — An empty Column.


newColumns()

Creates a new set ofColumns.

Available for Google Chat apps and Google Workspace add-ons.

constfirstColumn=CardService.newColumn().setHorizontalSizeStyle(CardService.HorizontalSizeStyle.FILL_AVAILABLE_SPACE).setHorizontalAlignment(CardService.HorizontalAlignment.CENTER).setVerticalAlignment(CardService.VerticalAlignment.CENTER);constsecondColumn=CardService.newColumn().setHorizontalSizeStyle(CardService.HorizontalSizeStyle.FILL_AVAILABLE_SPACE).setHorizontalAlignment(CardService.HorizontalAlignment.CENTER).setVerticalAlignment(CardService.VerticalAlignment.CENTER);constcolumns=CardService.newColumns().addColumn(firstColumn).addColumn(secondColumn).setWrapStyle(CardService.WrapStyle.WRAP);

Return

Columns — An empty set of Columns.


newCommonWidgetAction()


newComposeActionResponseBuilder()

Creates a newComposeActionResponseBuilder.

Return

ComposeActionResponseBuilder — An empty ComposeActionResponse builder.


newCondition()

Creates a newCondition used for client-side validation.

Return

Condition — An emptyCondition.


newDataSourceConfig()

Creates a new, emptyDataSourceConfig.

Return

DataSourceConfig — An emptyDataSourceConfig.


newDatePicker()

Creates a newDatePicker.

Return

DatePicker — An empty DatePicker.


newDateTimePicker()

Creates a newDateTimePicker.

Return

DateTimePicker — An empty DateTimePicker.


newDecoratedText()

Creates a newDecoratedText.

Return

DecoratedText — An empty DecoratedText.


newDialog()

Creates a newDialog.

Only available for Google Chat apps. Not available for Google Workspace add-ons.

constcard=CardService.newCardBuilder().setHeader(CardService.newCardHeader().setTitle('Card title')).build();// Sets the card of the dialog.constdialog=CardService.newDialog().setBody(card);

Return

Dialog — An emptyDialog.


newDialogAction()

Creates a newDialogAction.

Only available for Google Chat apps. Not available for Google Workspace add-ons.

constcard=CardService.newCardBuilder().setHeader(CardService.newCardHeader().setTitle('Card title')).build();constdialog=CardService.newDialog().setBody(card);constdialogAction=CardService.newDialogAction().setDialog(dialog);

Return

DialogAction — An emptyDialogAction.


newDivider()

Creates a newDivider. The following sample builds a simple card with 2 paragraphsseparated by a divider.

functionbuildCard(){constcardSection1TextParagraph1=CardService.newTextParagraph().setText('Hello world!');constcardSection1Divider1=CardService.newDivider();constcardSection1TextParagraph2=CardService.newTextParagraph().setText('Hello world!');constcardSection1=CardService.newCardSection().addWidget(cardSection1TextParagraph1).addWidget(cardSection1Divider1).addWidget(cardSection1TextParagraph2);constcard=CardService.newCardBuilder().addSection(cardSection1).build();returncard;}

Return

Divider — A divider.


newDriveDataSourceSpec()


newDriveItemsSelectedActionResponseBuilder()


newEditorFileScopeActionResponseBuilder()


newEventAction()

Creates a newEventAction used for client-side validation.

Return

EventAction — An emptyEventAction.


newExpressionData()

Creates a newExpressionData used for client-side validation.

Return

ExpressionData — An emptyExpressionData.


newExpressionDataAction()

Creates a newExpressionDataAction used for client-side validation.

Return

ExpressionDataAction — An emptyExpressionDataAction.


newExpressionDataCondition()

Creates a newExpressionDataCondition used for client-side validation.

Return

ExpressionDataCondition — An emptyExpressionDataCondition.


newFixedFooter()

Creates a newFixedFooter.

Return

FixedFooter — An empty FixedFooter.


newGrid()

Creates a newGrid.

Return

Grid — An empty Grid.


newGridItem()

Creates a newGridItem.

Return

GridItem — An empty GridItem.


newHostAppDataSource()


newIconImage()

Creates a newIconImage.

Return

IconImage — An empty icon image.


newImage()

Creates a newImage.

Return

Image — An empty Image.


newImageButton()

Creates a newImageButton.

Return

ImageButton — An empty ImageButton.


newImageComponent()

Creates a newImageComponent.

Return

ImageComponent — An empty ImageComponent.


newImageCropStyle()

Creates a newImageCropStyle.

Return

ImageCropStyle — An empty ImageCropStyle.


newKeyValue()

Creates a newKeyValue.

Return

KeyValue — An empty KeyValue.


newLinkPreview()

Creates a newLinkPreview.

constdecoratedText=CardService.newDecoratedText().setTopLabel('Hello').setText('Hi!');constcardSection=CardService.newCardSection().addWidget(decoratedText);constcard=CardService.newCardBuilder().addSection(cardSection).build();constlinkPreview=CardService.newLinkPreview().setPreviewCard(card).setTitle('Smart chip title');

Return

LinkPreview — An empty LinkPreview.


newMaterialIcon()

Creates a newMaterialIcon.

Available for Google Chat apps and Google Workspace add-ons.

constmaterialIcon=CardService.newMaterialIcon().setName('check_box').setFill(true);constcardSection=CardService.newCardSection();cardSection.addWidget(CardService.newDecoratedText().setStartIcon(CardService.newIconImage().setMaterialIcon(materialIcon)).setText('sasha@example.com'),);constcard=CardService.newCardBuilder().setHeader(CardService.newCardHeader().setTitle('Card Title')).addSection(cardSection).build();

Return

MaterialIcon — An empty MaterialIcon.


newNavigation()

Creates a newNavigation.

Return

Navigation — An empty Navigation.


newNotification()

Creates a newNotification.

Return

Notification — An empty Notification.


newOpenLink()

Creates a newOpenLink.

Return

OpenLink — An empty OpenLink.


newOverflowMenu()

Creates a newOverflowMenu.

Available for Google Chat apps. In developer preview for Google Workspace add-ons.

Developer Preview: Available as part of theGoogle Workspace Developer Preview Program, which grants early access to certain features.

constoverflowMenuItem=CardService.newOverflowMenuItem();// Finish building the overflow menu item...constoverflowMenu=CardService.newOverflowMenu().addMenuItem(overflowMenuItem);

Return

OverflowMenu — An empty OverflowMenu.


newOverflowMenuItem()

Creates a newOverflowMenuItem.

Available for Google Chat apps. In developer preview for Google Workspace add-ons.

Developer Preview: Available as part of theGoogle Workspace Developer Preview Program, which grants early access to certain features.

constoverflowMenuItem=CardService.newOverflowMenuItem().setStartIcon(CardService.newIconImage().setIconUrl('https://www.google.com/images/branding/googleg/1x/googleg_standard_color_64dp.png',),).setText('Open Link').setOpenLink(CardService.newOpenLink().setUrl('https://www.google.com'));

Return

OverflowMenuItem — An empty OverflowMenuItem.


newPlatformDataSource()


newSelectionInput()

Creates a newSelectionInput.

Return

SelectionInput — An empty SelectionInput.


newSuggestions()

Creates a newSuggestions.

Return

Suggestions — An empty Suggestions.


newSuggestionsResponseBuilder()

Creates a newSuggestionsResponseBuilder.

Return

SuggestionsResponseBuilder — An empty SuggestionsResponse builder.


newSwitch()

Creates a newSwitch.

Return

Switch — An empty Switch.


newTextButton()

Creates a newTextButton.

Return

TextButton — An empty TextButton.


newTextInput()

Creates a newTextInput.

Return

TextInput — An empty TextInput.


newTextParagraph()

Creates a newTextParagraph.

Return

TextParagraph — An empty TextParagraph.


newTimePicker()

Creates a newTimePicker.

Return

TimePicker — An empty TimePicker.


newTrigger()

Creates and returns a newTrigger used for client-side validation.

Return

Trigger — An emptyTrigger.


newUniversalActionResponseBuilder()

Creates a newUniversalActionResponseBuilder.

Return

UniversalActionResponseBuilder — An empty UniversalActionResponse builder.


newUpdateDraftActionResponseBuilder()

Creates a newUpdateDraftActionResponseBuilder.

Return

UpdateDraftActionResponseBuilder — An empty UpdateDraftActionResponseBuilder.


newUpdateDraftBccRecipientsAction()

Creates a newUpdateDraftBccRecipientsAction;

Return

UpdateDraftBccRecipientsAction — An empty UpdateDraftBccRecipientsAction.


newUpdateDraftBodyAction()

Creates a newUpdateDraftBodyAction.

Return

UpdateDraftBodyAction — An empty UpdateDraftBodyAction.


newUpdateDraftCcRecipientsAction()

Creates a newUpdateDraftCcRecipientsAction.

Return

UpdateDraftCcRecipientsAction — An Empty UpdateDraftCcRecipientsAction.


newUpdateDraftSubjectAction()

Creates a newUpdateDraftSubjectAction.

Return

UpdateDraftSubjectAction — An empty UpdateDraftSubjectAction.


newUpdateDraftToRecipientsAction()

Creates a newUpdateDraftToRecipientsAction.

Return

UpdateDraftToRecipientsAction — An empty UpdateDraftToRecipientsAction.


newUpdateVisibilityAction()


newValidation()

Creates a newValidation.

Available for Google Chat apps and Google Workspace add-ons.

constvalidation=CardService.newValidation().setCharacterLimit(5).setInputType(CardService.InputType.EMAIL);
Developer Preview: Available as part of theGoogle Workspace Developer Preview Program, which grants early access to certain features.

Return

Validation — An empty validation.


newWorkflowDataSource()

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-03 UTC.