Google Script Error: You do not have permission to call openById

前端 未结 2 689
感动是毒
感动是毒 2021-01-14 15:11

I am trying to send a mail with attaching a file available in my google drive using following google scripts

var file=DriveApp.getFileById(\'1qZVK0UZ1jLbDdj1         


        
2条回答
  •  有刺的猬
    2021-01-14 15:34

    I ran into this same issue, but felt it was a little silly to have to use the FormResponses Sheet to get the submission event (I mean there's a trigger on the Form Apps Scripts for a reason, right?).

    All I had to do was to Remove and Re-add the trigger for From form --> On form submit. When I added it, challenged me for OAuth permissions to view and use my google drive.

    Immediately after this, I was able to run on a Forms Apps Script Submission trigger again.

提交回复
热议问题