Script function not found :doGet

38 Views Asked by At

I am trying to build a web app using google script and html form.The webapp works perfectly when I have the html file locally. But when I embed my html into a google site, this does not work. It reports "Script function not found: doGet"

1

There are 1 best solutions below

0
Lewis Rodgers On

From the docs:

Both standalone scripts and scripts bound to Google Workspace applications can be turned into web apps, so long as they meet the requirements below.

Requirements for web apps

A script can be published as a web app if it meets these requirements:

  • It contains a doGet(e) or doPost(e) function.
  • The function returns an HTML service HtmlOutput object or a Content service TextOutput object.

Take a look at Serve HTML as a web app for the bare minimum you need in place.