Don't have the permission to Operate Sheets of Google Form Destination

393 views Asked by At

I am not writing a code with the Google FormApp, as we all know, every Form has a Destination Sheet,I want to open the SpreadsheetApp by :

var destId = FormApp.getActiveForm().getDestinationId();
var ss = SpreadsheetApp.openById(destId);

But I've got an warning that "you don't have the permission openById",that means I can't open the Spreadsheet in the FormApp's script?

Or is there anything wrong with my code?

P.s. I am writing code based on "form notifications by google".

Thanks!

1

There are 1 answers

0
Mobai On

delete the code @OnlyCurrentDoc

/**
 * @OnlyCurrentDoc
 *
 * The above comment directs Apps Script to limit the scope of file
 * access for this add-on. It specifies that this add-on will only
 * attempt to read or modify the files in which the add-on is used,
 * and not all of the user's files. The authorization request message
 * presented to users will reflect this limited scope.
*/