Stay organized with collections
Save and categorize content based on your preferences.
ButtonSet
Holds a set of Button objects that are displayed in a row.
Available for Google Workspace add-ons and Google Chat apps.
consttextButton=CardService.newTextButton();// Finish building the text button...constimageButton=CardService.newImageButton();// Finish building the image button...constbuttonSet=CardService.newButtonSet().addButton(textButton).addButton(imageButton);
[[["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\u003eButtonSet\u003c/code\u003e objects organize and display a row of \u003ccode\u003eButton\u003c/code\u003e objects within Google Workspace Add-ons and Google Chat apps.\u003c/p\u003e\n"],["\u003cp\u003eYou can add buttons, which can be either text-based or image-based, to a \u003ccode\u003eButtonSet\u003c/code\u003e using the \u003ccode\u003eaddButton()\u003c/code\u003e method.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eaddButton()\u003c/code\u003e method allows for building the layout by adding \u003ccode\u003eButton\u003c/code\u003e objects and facilitating chained operations for efficient design.\u003c/p\u003e\n"]]],["The `ButtonSet` object holds and displays a row of `Button` objects. You can create a `ButtonSet` using `CardService.newButtonSet()`. To add buttons, use the `addButton(button)` method, passing in a `Button` object. This method can be chained to add multiple buttons sequentially. `addButton` returns the `ButtonSet` object itself. This functionality is available for Google Workspace add-ons and Google Chat apps.\n"],null,["ButtonSet\n\nHolds a set of [Button](/apps-script/reference/card-service/button) objects that are displayed in a row.\n\nAvailable for Google Workspace add-ons and Google Chat apps.\n\n```javascript\nconst textButton = CardService.newTextButton();\n// Finish building the text button...\n\nconst imageButton = CardService.newImageButton();\n// Finish building the image button...\n\nconst buttonSet =\n CardService.newButtonSet().addButton(textButton).addButton(imageButton);\n``` \n\nMethods\n\n| Method | Return type | Brief description |\n|-----------------------------------------|----------------|-------------------|\n| [addButton(button)](#addButton(Button)) | [ButtonSet](#) | Adds a button. |\n\nDetailed documentation \n\n`add``Button(button)` \nAdds a button.\n\nParameters\n\n| Name | Type | Description |\n|----------|------------------------------------------------------|--------------------|\n| `button` | [Button](/apps-script/reference/card-service/button) | The button to add. |\n\nReturn\n\n\n[ButtonSet](#) --- This object, for chaining."]]