Defines navigation between cards in an add-on.
class CardService method .newNavigation()
CardService is the Apps Script service.
.newNavigation() is the method name you will see after a dot in your code.
What it does
Why it's used
- Open another card or external URL from a button.
- Multi-step add-on flows without leaving Gmail.
Common errors
- Forgetting parentheses on newNavigation. Write CardService.newNavigation(), not CardService.newNavigation or newNavigation by itself.
- Skipping dots between chained calls. Each step needs a dot, like CardService.newNavigation().
- Adding spaces where they do not belong. Write CardService.newNavigation(), not CardService .newNavigation(), CardService.newNavigation (), or CardService . newNavigation().
- Wrong capitalization. Use CardService and newNavigation, not cardservice or newnavigation.
Explore
Related methods
-
.newAction()
Defines what happens when a card button is clicked.
-
.newCardBuilder()
Starts building a card UI for a Workspace add-on.
-
.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.