Scripts Email Issues

Below is a copy of an email I regularly get regarding scripts. I know nothing about this topic. This email relates to me setting up reminders in the past that really didn’t work and I shut it down and followed Tiller instructions two stop the app but those instructions did not work and I still get this email. Any help that anyone can provide would be greatly appreciated. Thanks, Blake

If you go to your script editor for that apps script (Tools -> Script Editor from the spreadsheet) and then in the apps script editor you will find in the “Edit” menu, a selection for “Current Project’s Triggers” shows. Selecting that will open a new tab with the triggers that are currently set. You should then be able to select the trigger that is running (should be named what you named it in your script, or the script that created it) and you’ll see three vertical dots to the far right to click on. Once clicking on those dots, you’ll get a menu and “Delete trigger” is an option, click it and the trigger should be removed and those emails should stop. (Be careful about the triggers you delete, you don’t want to delete a trigger that is launching something you really want running)

@tom

When I do what you say this is what I get. The little triangle next to code.gs brings up a drop-down that allows me to rename, delete, or make a copy. Should I select delete here?

Hey Blake,
According to the email you get, the script is called “Weekly Expense Scripts”. The project you are opening has never been used and has no scripts tied to it. Do you remember which sheet you created this “Weekly Expense Scripts” in? You would need to open that sheet and get to the script editor to get the trigger tied to that project.

The only other way to do it is to give the project you just opened a name like “Test Script” and save it. Then you would have access to the script editor and could go to “Edit” and in the Edit menu you will find a selection for “All Your Triggers”. These would be all the triggers associated with your user and here you’d need to be VERY careful as you wouldn’t want to stop a trigger that’s running AutoCat or some other function you really want running. But if you see the trigger associated with “Weekly Expense Scripts”, and you are sure, you can delete the trigger the same way as above, but remember you need to be SURE you are deleting the correct trigger. Let me know if you need further help.

1 Like

@tom

I just went into the sheet that I created the script in, saw the trigger, and deleted it, all according to your specific instructions. I will let you know if the emails keep coming. I appreciate your help.

Blake

1 Like

@tom, I got the same email again this morning. Blake

I just noticed in your email, that the time based trigger is being generated from an onOpen function. In the script you created this email code in, is there a line of code still in the onOpen function that is creating a time based trigger? (Every time you open the sheet?) And if you go back and look at that script where you found and deleted the trigger, is there a trigger back there now? I’m wondering if it is being created every time you open that sheet since it seems to be created from the onOpen function?

@tom

Yes, looks like you have a time based trigger on “Weekly Expense Scripts”. If you already deleted it once, then you likely have a script launching and setting it “onOpen” somewhere in those “Weekly Expense Scripts”

So, what do you recommend I do? Blake

There must be some code in the “Weekly Expense Scripts” that is creating the time based trigger. You would need to either comment it out (put // in front of the code), or delete it. You could look for the words: ScriptApp newTrigger timeBased in your scripts and either comment out or remove the code. Then you can delete the trigger and it will never show back up again. To search for the words above go into the script editor like we explained above, and there will be an “Edit”, then “Find and Replace” option - select it, and enter timeBased in the Find and click the Find button and it will take you to the code (hopefully). If you are not comfortable commenting the code out, if you could give me a screen capture of a section of the code with the trigger in it, I can give you a more direct suggestion at that point.

@tom

Here is a 3 minute screen sharing session that might help you help me.

Blake

https://drive.google.com/open?id=1e2QfwLyIFJnZsb0-AXdKTzYxgm0TTe7S

Hi @Blake,

Did you happen to turn on the Auto Save feature for automatically saving balance history entries in that specific Google Sheet?

Heather

@heather

The Auto Save dropdown is right next to the Help dropdown in that sheet but I do not know if it is on or off. When I click on the dropdown it provides two options; Start and Stop. Should it be on or off? Click on Start or Stop?

In my current Foundations sheet, that Auto Save dropdown is not there.

Thanks,

Blake

@Blake - turn it off (stop) and see if it stops sending you emails.

That option is intentionally not available in the Foundation Template.

Hey Blake,
Just checking to make sure the email stopped coming into your inbox?

@tom, @heather,

Yes, the last email I received was 12-17. Tom’s solution worked. I did not do what Heather mentioned because I wanted to wait awhile longer to first see if Tom’s suggestion worked. Thank you both for your help. Blake