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
TL;DR:
To build interfaces for Gmail add-ons, you must use the Card service instead [of the HTML Service].
Quoted from your reference, under HTML service
.
For popups, +1 to @akshay who recommended OVERLAY: CardService.newOpenLink().setOpenAs(CardService.OpenAs.OVERLAY)
, which will "Open as an overlay such as a pop-up". See CardService OpenAs.
In the overview section of the CardService, It quotes:
“Currently you can only use this service to construct Gmail add-ons.“
So HtmlService is not available in constructing Gmail addon’s currently.
https://developers.google.com/apps-script/reference/card-service/