Skip to content

Instantly share code, notes, and snippets.

@iskenxan
Created March 25, 2019 03:29
Show Gist options
  • Save iskenxan/2e2adce75c8f01128f98f5f871718a13 to your computer and use it in GitHub Desktop.
Save iskenxan/2e2adce75c8f01128f98f5f871718a13 to your computer and use it in GitHub Desktop.
Gmail add-on update buildAddon
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