简体   繁体   中英

Apps script authorization for openId don't work with onEdit(e) trigger

I have a problem with a google sheet script, I would like to transfer data from one workbook to another using an onEdit trigger, but when my trigger fires, I have a message of error in the execution log which says that I do not have the authorizations to access this file, however when I do the same action but without trigger (by activating the function by hand) it works without problem. I don't know at all where the problem comes from, if someone can help me it would be really appreciated because I'm desperate (I found absolutely nothing on google after hours of research), thank you in advance for your help and have a nice day. Joseph Menard (PS; I am attaching a link to a video of my screen showing my problem; https://www.loom.com/share/f1a0fde043f74143b7caad78ae806be6 )

I assume you are using a simple onEdit trigger? Simple triggers run without authorisation from the user and are subject to several restrictions . Instead ty using an installable onEdit trigger and see if that helps?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM