I have a template document with a bound script that does some basic field validation. In addition to a menu item, I create a time-based trigger in onOpen(e) to run the validation function every minute. All of this works perfectly when I open the template document (I've granted the permission to access the document when prompted).
ScriptApp.newTrigger(TRIGGER_FUNCTION_NAME)
.timeBased()
.everyMinutes(1)
.create();
When I create a copy of this template document, the time-based trigger doesn't run for other users. From documentation and here I read that the installed trigger would run with my credentials which is ok. But I do not understand why the trigger won't run in the copied document for another user with EDIT rights (or prompt for rights)?
Is this approach feasible? Add-ons can only run once per hour so I cannot use that and there is no onEdit() trigger for documents. Does the onOpen() have to also be an installed trigger for this to work?