user3745444
user3745444

Reputation: 11

Spreadsheet event trigger on Google Apps script doesn't fire when the sheet is edited by another script

I wrote a small script bound to a Google spreadsheet that reads an email-address from a cell in the last row and sends an email to it. The values are collected by a WebApp (not by Google form).

I tried all kind of triggers. The time driven triggers work, but the spreadsheet triggers don't work. I tried all of them. If I change manually some cell in the spreadsheet the onEdit trigger is working, but it doesn't fire up when the sheet was changed by another script.

Upvotes: 0

Views: 1574

Answers (2)

mapik88
mapik88

Reputation: 1

Not every change triggers onEdit(). Please take a look on answer from topic Detect user inserting row or column in a google spreadsheet and reacting in a script - you will find registered bugs and one of them says that values written by scripts do not trigger onEdit().

Upvotes: -1

Albert
Albert

Reputation: 134

Google's dev says : The onEdit() trigger runs automatically when a user changes the value of any cell in a spreadsheet. but it doesn't precise the change could be from script or not.

You'll find here a comment from HDCerberus :

I'm not at my PC to write a full response, but at a glance it could be the OnEdit trigger, which ONLY works when the sheet is edited manually, and NOT by a script. Are you expecting it to run when the sheet is edited manually or by a script?

Upvotes: 0

Related Questions