I am trying to use the google.run.script function in one of my projects and it doesn\'t seem to be triggering the function to run.
So I made a new project and tested a
I just copied your code and it is working for me. It seems that you have other code in your project which might have some errors.
Otherwise, you might be using URL of old version of your deployed project.
Deployment procedure is available here. https://developers.google.com/apps-script/guides/web
I think that your script works fine. doSomething()
is run by google.script.run.doSomething()
, and you can see I was called!
at the log. So please confirm the following flow.
doGet()
is directly run on script editor, it doesn't work. At that time, please deploy as Web Apps. You can see the detail of how to deploy Web Apps is here.latest code
of Test web app for your latest code.
. This can be seen below.
If this was not useful for you, I'm sorry.