Error: Script function not found: myFunction

11,901 views
Skip to first unread message

Adashki

unread,
Sep 18, 2014, 6:36:38 AM9/18/14
to forme...@googlegroups.com
Hi! I was able to successfully install and use the FormEmail script in a Google form 2 weeks ago. However, upon trying to create a new form today, I got this error after I tried to run the script: "Script function not found: myFunction". Did Google change things again so the script isn't working? :(

Henrique Abreu

unread,
Sep 18, 2014, 7:19:13 AM9/18/14
to FormEmailer on behalf of Adashki
Hi Adashki,

You've probably set up something wrong, because there's not a function named "myFunction" in FormEmailer script.
I suggest you remove your trigger, then try setting it again to run the "timeDriven" function. If you can't find such function, then remove the script entirely and install it again (more carefully this time).

Regards,

Henrique Abreu

On Thu, Sep 18, 2014 at 7:36 AM, Adashki via FormEmailer <formemailer+noreply-APn2wQdPhX7a...@googlegroups.com> wrote:
Hi! I was able to successfully install and use the FormEmail script in a Google form 2 weeks ago. However, upon trying to create a new form today, I got this error after I tried to run the script: "Script function not found: myFunction". Did Google change things again so the script isn't working? :(

--
You received this message because you are subscribed to the Google Groups "FormEmailer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to formemailer...@googlegroups.com.
To post to this group, send email to forme...@googlegroups.com.
Visit this group at http://groups.google.com/group/formemailer.
For more options, visit https://groups.google.com/d/optout.

Adashki

unread,
Sep 19, 2014, 1:44:44 AM9/19/14
to forme...@googlegroups.com
Hi Henrique!

Thanks for your response. I tried as you suggested, ran the script using a clean form and chose "timeDriven". This is the error I got this time around:

TypeError: Cannot call method "getSheetByName" of null. (line 933, file "Code")


Cheers,
Ada




On Thursday, September 18, 2014 7:19:13 PM UTC+8, Henrique Abreu wrote:
Hi Adashki,

You've probably set up something wrong, because there's not a function named "myFunction" in FormEmailer script.
I suggest you remove your trigger, then try setting it again to run the "timeDriven" function. If you can't find such function, then remove the script entirely and install it again (more carefully this time).

Regards,

Henrique Abreu

Adashki

unread,
Sep 19, 2014, 2:17:07 AM9/19/14
to forme...@googlegroups.com
Just to add: the EmailerForm link shows in the spreadsheet but it is not emailing automatically.

I tried following these instructions:

--- Click the only link and set up a new trigger as follows:   
timeDriven - Time-driven - Minutes timer - Every minute   

But the timedriven options "minutes timer - every minute" are no longer there. The only option is timedriven > from form > on form submit

Could that be causing the problem?

Thanks in advance!

Henrique Abreu

unread,
Sep 19, 2014, 6:57:50 AM9/19/14
to FormEmailer on behalf of Adashki
Not exactly, but the "Time-Driven" is there, you just have to select it instead of "From spreadsheet".

Did you removed the FormEmailer sheet and ran the "install" function afterwards?

Henrique Abreu

Adashki

unread,
Sep 19, 2014, 7:06:40 AM9/19/14
to forme...@googlegroups.com
Yup! Did that just now. Same banana. Still not emailing.

I'll try doing it on a brand new form and let you know what happens. :)



On Friday, September 19, 2014 6:57:50 PM UTC+8, Henrique Abreu wrote:
Not exactly, but the "Time-Driven" is there, you just have to select it instead of "From spreadsheet".

Did you removed the FormEmailer sheet and ran the "install" function afterwards?

Henrique Abreu

Henrique Abreu

unread,
Sep 19, 2014, 7:56:25 AM9/19/14
to FormEmailer on behalf of Adashki

Adashki

unread,
Sep 19, 2014, 1:10:51 PM9/19/14
to forme...@googlegroups.com
Yup! The latest comment in that video is actually mine. :)

This is the video I followed the first time I used the script two weeks ago when it worked. When I follow the video now it doesn't work anymore.

On Friday, September 19, 2014 7:56:25 PM UTC+8, Henrique Abreu wrote:
This is weird. Have you watched this video?

Adashki

unread,
Sep 22, 2014, 1:38:42 AM9/22/14
to forme...@googlegroups.com
Latest update: Tried installing the script on a brand new form. Deleted all the other files in the Google drive to make sure no other scripts were running.

After giving the script authorization to access my Google account, this is the error I got:


Script function not found: myFunction

Still not emailing automatically but works when I do it manually.

Thanks for your patience and help!

Adashki

unread,
Sep 22, 2014, 1:58:29 AM9/22/14
to forme...@googlegroups.com

Henrique Abreu

unread,
Sep 22, 2014, 7:20:48 AM9/22/14
to FormEmailer on behalf of Adashki
Please search for "myFunction" inside the script editor, send me a print if you find something.

Also, please take a screenshot of your trigger setup.

Henrique Abreu
Message has been deleted

Adashki

unread,
Sep 22, 2014, 8:43:46 AM9/22/14
to forme...@googlegroups.com
Hi Henrique! I was able to make your script work but I had to sign-up for a new GMAIL account. It seems the problem happens when I try to use the script on accounts where I had the Form Mailer script previously installed. Perhaps the Google API "remembers" previously installed scripts and blocks new ones from working, despite being removed?

Anyway, thanks so much for your help and patience! Appreciate it a lot! :)


On Monday, September 22, 2014 7:20:48 PM UTC+8, Henrique Abreu wrote:
Please search for "myFunction" inside the script editor, send me a print if you find something.

Also, please take a screenshot of your trigger setup.

Henrique Abreu

Henrique Abreu

unread,
Sep 22, 2014, 8:50:28 AM9/22/14
to FormEmailer on behalf of Adashki
You probably did some step wrong a while ago that you're not fixing by removing, or you're not removing it correcly. I'm not sure, I would have to take a personal look to figure out, but I do not have this time.

Henrique Abreu
Message has been deleted

Create Your Path

unread,
Nov 10, 2014, 1:20:31 PM11/10/14
to forme...@googlegroups.com
Hi Henrique, I just found this thread and thought I would revive it. I'm having the same problem with formemailer. The script was installed on the spreadsheet about 6 months ago with no problems and has worked wonderfully. Then the owner left and I uninstalled the form so that it would not be sent from his name in the email. However, there was no option to delete the script from the script editor, so I just deleted all of the script rather than the project itself, then deleted the extra tab int the spreadsheet. Now when installing it, it will install from the script gallery, but when I click the form emailer tab on top, it says  Script function not found: install.  .  Any help would be appreciated. Thanks! - Sam
- hide quoted text -

Henrique Abreu

unread,
Nov 10, 2014, 1:49:44 PM11/10/14
to FormEmailer on behalf of Create Your Path
I recommend you create a new spreadsheet and a new script that you own. Having multiple copies, owned by different users might be triggering some bug in Apps Script enviroment.

Henrique Abreu

On Mon, Nov 10, 2014 at 4:20 PM, Create Your Path via FormEmailer <formemailer+noreply-APn2wQdD5sqT...@googlegroups.com> wrote:
Hi Henrique, I just found this thread and thought I would revive it. I'm having the same problem with formemailer. The script was installed on the spreadsheet about 6 months ago with no problems and has worked wonderfully. Then the owner left and I uninstalled the form so that it would not be sent from his name in the email. However, there was no option to delete the script from the script editor, so I just deleted all of the script rather than the project itself, then deleted the extra tab int the spreadsheet. Now when installing it, it will install from the script gallery, but when I click the form emailer tab on top, it says  Script function not found: install.  .  Any help would be appreciated. Thanks! - Sam
- hide quoted text -

--

Create Your Path

unread,
Nov 10, 2014, 2:18:07 PM11/10/14
to forme...@googlegroups.com
Thanks Henrique. Actually, we had tied ourselves quite a knot - this form was linked to a bit.ly which was published on websites and included in hundreds of handouts, and the bitly can't be changed, so recreating the form is the last possible option. Good news, though, I got it to work! The original formemailer script was still live although it was hollowed out. The program would not let me delete it completely, saying it was the only script in the project. So I created a new script in the same project and typed in some random letters to allow me to delete the original formemailer script. Then reinstalled and it worked as if it were new. So thanks for your help, looks like we are back on track. 
Reply all
Reply to author
Forward
0 new messages