Created
March 25, 2019 03:25
-
-
Save iskenxan/deb90c4ad7f32c75021437573c06e999 to your computer and use it in GitHub Desktop.
Gmail add-on basic setup
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); | |
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