Starts building a card UI for a Workspace add-on.
class CardService method .newCardBuilder()
CardService is the Apps Script service.
.newCardBuilder() is the method name you will see after a dot in your code.
What it does
Why it's used
- Start a Gmail or Calendar add-on card UI.
- Workspace add-ons are built card by card.
Common errors
- Forgetting parentheses on newCardBuilder. Write CardService.newCardBuilder(), not CardService.newCardBuilder or newCardBuilder by itself.
- Skipping dots between chained calls. Each step needs a dot, like CardService.newCardBuilder().
- Adding spaces where they do not belong. Write CardService.newCardBuilder(), not CardService .newCardBuilder(), CardService.newCardBuilder (), or CardService . newCardBuilder().
- Wrong capitalization. Use CardService and newCardBuilder, not cardservice or newcardbuilder.
Explore
Related methods
-
.newNavigation()
Defines navigation between cards in an add-on.
-
.newAction()
Defines what happens when a card button is clicked.
-
.newTextButton()
Creates a clickable text button for a card.
-
.newTextParagraph()
Creates a block of text for a card.
More Apps Script
Better Sheets tutorials
No tagged tutorials yet. Fetch Apps Script from the harvest table and this page fills automatically.