Class OverflowMenu
Stay organized with collections
Save and categorize content based on your preferences.
OverflowMenu
Holds a list of OverflowMenuItem
objects that are displayed in a pop-up menu.
Available for Google Chat apps. In developer preview for Google Workspace add-ons.
const overflowMenuItem = CardService.newOverflowMenuItem();
// Finish building the overflow menu item...
const overflowMenu =
CardService.newOverflowMenu().addMenuItem(overflowMenuItem);
Detailed documentation
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-01-30 UTC.
[null,null,["Last updated 2025-01-30 UTC."],[[["\u003cp\u003eOverflowMenu displays a pop-up menu containing OverflowMenuItems and is available for Google Chat apps and in developer preview for Google Workspace Add-ons.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can create an OverflowMenu and populate it with OverflowMenuItems using methods like \u003ccode\u003eaddMenuItem\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eaddMenuItem\u003c/code\u003e method appends an OverflowMenuItem to the OverflowMenu, facilitating menu creation within Google Chat apps and Workspace Add-ons.\u003c/p\u003e\n"]]],[],null,["# Class OverflowMenu\n\nOverflowMenu\n\nHolds a list of [OverflowMenuItem](/apps-script/reference/card-service/overflow-menu-item) objects that are displayed in a pop-up menu.\n\nAvailable for Google Chat apps. In developer preview for Google Workspace add-ons.\n\n\n| **Developer Preview:** Available as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features.\n\n\u003cbr /\u003e\n\n```javascript\nconst overflowMenuItem = CardService.newOverflowMenuItem();\n// Finish building the overflow menu item...\n\nconst overflowMenu =\n CardService.newOverflowMenu().addMenuItem(overflowMenuItem);\n``` \n\n### Methods\n\n| Method | Return type | Brief description |\n|---------------------------------------------------------|-------------------|-------------------|\n| [addMenuItem(menuItem)](#addMenuItem(OverflowMenuItem)) | [OverflowMenu](#) | Adds a menu item. |\n\nDetailed documentation\n----------------------\n\n### `add``Menu``Item(menuItem)`\n\nAdds a menu item.\n\n#### Parameters\n\n| Name | Type | Description |\n|--------------|----------------------------------------------------------------------------|-----------------------|\n| `menu``Item` | [OverflowMenuItem](/apps-script/reference/card-service/overflow-menu-item) | The menu item to add. |\n\n#### Return\n\n\n[OverflowMenu](#) --- This object, for chaining."]]