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);
constcard=CardService.newCardBuilder().setHeader(CardService.newCardHeader().setTitle('Card title')).build();// Sets the card of the dialog.constdialog=CardService.newDialog().setBody(card);
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-01-30 UTC."],[[["\u003cp\u003e\u003ccode\u003eDialog\u003c/code\u003e helps you create interactive dialogs within Google Chat apps for displaying information or gathering input.\u003c/p\u003e\n"],["\u003cp\u003eIt's exclusively for Google Chat apps and not available for Google Workspace Add-ons.\u003c/p\u003e\n"],["\u003cp\u003eThe core functionality involves setting a card, built using \u003ccode\u003eCardService\u003c/code\u003e, as the body of the dialog to present content to the user.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003esetBody()\u003c/code\u003e method is key to setting the card within the dialog and supports chaining for further configurations.\u003c/p\u003e\n"]]],[],null,["Dialog\n\nFor details, see [Open interactive\ndialogs](https://developers.google.com/chat/how-tos/dialogs) in the Google Chat documentation.\n\nA builder for [Dialog](#) objects.\n\nOnly available for Google Chat apps. Not available for Google Workspace add-ons.\n\n```javascript\nconst card = CardService.newCardBuilder()\n .setHeader(CardService.newCardHeader().setTitle('Card title'))\n .build();\n\n// Sets the card of the dialog.\nconst dialog = CardService.newDialog().setBody(card);\n``` \n\nMethods\n\n| Method | Return type | Brief description |\n|---------------------------------|-------------|--------------------------------|\n| [setBody(card)](#setBody(Card)) | [Dialog](#) | Sets the card of the `Dialog`. |\n\nDetailed documentation \n\n`set``Body(card)` \nSets the card of the `Dialog`.\n\n```javascript\nconst card = CardService.newCardBuilder()\n .setHeader(CardService.newCardHeader().setTitle('Card title'))\n .build();\n\n// Sets the card of the dialog.\nconst dialog = CardService.newDialog().setBody(card);\n```\n\nParameters\n\n| Name | Type | Description |\n|--------|--------------------------------------------------|--------------------------------------------------------------|\n| `card` | [Card](/apps-script/reference/card-service/card) | The [Card](/apps-script/reference/card-service/card) to use. |\n\nReturn\n\n\n[Dialog](#) --- This object, for chaining."]]