Since the beginning of this month this code has not more been working
function onEdit(e){
var html = HtmlService.createTemplateFromFile( \'
The onEdit()
will have to be an Installable Trigger because it is using a service that requires authorization.
note: rename onEdit()
when using it as an installable trigger to avoid possible issues
Like simple triggers, installable triggers let Apps Script run a function automatically when a certain event, such as opening a document, occurs. Installable triggers, however, offer more flexibility than simple triggers: they can call services that require authorization, ...
Managing triggers manually:
To manually create an installable trigger through a dialog in the script editor, follow these steps: