Answer the question
In order to leave comments, you need to log in
How to use DocumentApp in custom functions?
Good afternoon. We needed a function that gets the text of a document by its id . There were no problems with getting the data. But when I try to wrap it all in a custom function, I get this error:
Вам не разрешено вызывать пользователя DocumentApp.openById.
Необходимые разрешения: https://www.googleapis.com/auth/documents.
Answer the question
In order to leave comments, you need to log in
No way. Because user-defined functions are a different type from other scripts.
Custom Functions in Google Sheets | Apps Script...
Unlike most other types of Apps Scripts, custom functions never ask users to authorize access to personal data. consequent, they can only call services that do not have access to personal data, specifically the following:
Supported services notes Cache Works, but not particularly useful in custom functions HTML Can generate HTML, but cannot display it (rarely useful) JDBC language lock Works, but not particularly useful in custom functions Maps Can calculate directions, but not display maps Properties Spreadsheet Read only (can use most get*()
methods, but notset*()
).
Cannot open other spreadsheets (SpreadsheetApp.openById()
orSpreadsheetApp.openByUrl()
).URL Fetch Utilities XML
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question