Google Sheets: installable trigger seems to disable simple trigger script

前端 未结 1 657
不知归路
不知归路 2021-01-29 07:42

I have a Google sheet with a function that enters a timestamp in a column if the column to its left is updated. It is triggered by the simple onedit trigger, and it only proces

相关标签:
1条回答
  • 2021-01-29 08:27

    the timestamp routine works for me, the author of the script, but it does not work for anyone else.

    Issue can be found in Stackdriver logs. Go to Script Editor>View> Executions>Clear all filters. Check the failed logs. Most possible reason is You restricted access to those people. If the "user at the keyboard" is not permitted to do something manually, He cannot do that through scripts either. Another possible reason is Anonymous edits cannot show popups/dialogs; If you added such code to your function, Your function will fail.

    Possible Solution(s):

    • Provide the necessary permission or

    • Create a installable onEdit trigger, so that the function will run under your authority. In this case, if editors are able to access your editor, they may be able to execute scripts as you. Protecting all sheets with unprotected ranges may help this, but does not provide complete security. Reducing authorised access scope might also help

    • Another way to do this is by creating a service account and use oauth library to access the sheet.Sample here and here.

    0 讨论(0)
提交回复
热议问题