Apps Script Refused to Connect
You need to set the option XFrameOptionsMode
to ALLOWALL
.
XFrameOptionsMode
https://developers.google.com/apps-script/reference/html/x-frame-options-mode
Setting XFrameOptionsMode.ALLOWALL will let any site iframe the page, so the developer should implement their own protection against clickjacking.
return template.evaluate().setSandboxMode(HtmlService.SandboxMode.IFRAME)
.setXFrameOptionsMode(HtmlService.XFrameOptionsMode.ALLOWALL);
As stated in the comments below (Shan Eapen Koshy said) check that your browser is logged into one Google account only.