I am creating a Gmail Add-on. The following reference page says - https://developers.google.com/gmail/add-ons/reference/
"Gmail add-ons are built using Apps Script and the many services it provides. You can use any of the Apps Script services when building your add-on"
Basically, I want to have the small screen to pop up on clicking a button in my Gmail add-on.
As of now I have added a button in my section as follows and tied it to an action handler 'htmltest':-
var htmlTest = CardService.newAction().setFunctionName('htmlTest');
var button = CardService.newTextButton().setText("htmlTest").setOnClickAction(htmlTest);
section.addWidget(button);
This is how htmlTest looks like:-
function htmlTest(e){
return HtmlService.createHtmlOutputFromFile('doubleCheck');
}
And this is the doubleCheck.html file I want it to pop up:-
<!DOCTYPE html>
<html>
<head>
<base target="_top">
</head>
<body>
Hello, World!
</body>
</html>
But when I click the button it gives a run-time error:- Missing required fields in markup:
Any clues how to use HtmlService while creating Gmail