Created
March 25, 2019 03:29
-
-
Save iskenxan/2e2adce75c8f01128f98f5f871718a13 to your computer and use it in GitHub Desktop.
Gmail add-on update buildAddon
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function buildAddOn(e) { | |
var accessToken = e.messageMetadata.accessToken; | |
GmailApp.setCurrentMessageAccessToken(accessToken); | |
checkAuth() | |
var section = CardService.newCardSection() | |
var textWidget = CardService.newTextParagraph().setText('Hello World') | |
section.addWidget(textWidget); | |
var card = CardService.newCardBuilder() | |
.setHeader(CardService.newCardHeader() | |
.setTitle('Addon Demo')) | |
.addSection(section) | |
.build(); | |
return [card]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment