I\'ve try to create simple form in gmail addon,
how to use html service
The below code,i have tried,
function buildAddOn(e) {
var accessToken =
I understood that you want to use HTML at Gmail add-on. If my understanding is correct, how about these sample scripts?
function buildAddOn() {
var html = HtmlService.createTemplate('<b>Hello, world!</b>').evaluate().getContent();
return CardService.newCardBuilder()
.setHeader(CardService.newCardHeader().setTitle('sample'))
.addSection(CardService.newCardSection().addWidget(CardService.newKeyValue().setContent(html)))
.build();
}
function buildAddOn() {
var html = HtmlService.createTemplateFromFile("index").evaluate().getContent();
return CardService.newCardBuilder()
.setHeader(CardService.newCardHeader().setTitle('sample'))
.addSection(CardService.newCardSection().addWidget(CardService.newKeyValue().setContent(html)))
.build();
}
index.html
<b>Hello, world!</b>
If I misunderstand your question, I'm sorry.