Class Dialog

  • Dialog is a builder for Dialog objects.

  • Dialogs are only available for Google Chat apps, not Google Workspace add-ons.

  • ThesetBody(card) method sets the card of the Dialog object.

Dialog

For details, seeOpen interactivedialogs in the Google Chat documentation.

A builder forDialog objects.

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

Methods

MethodReturn typeBrief description
setBody(card)DialogSets the card of theDialog.

Detailed documentation

setBody(card)

Sets the card of theDialog.

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

Parameters

NameTypeDescription
cardCardTheCard to use.

Return

Dialog — This object, for chaining.

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.