'Creating document from google sheets app script
I'm trying to create a document using google app scripts from a sheet. I have the following function
function createDoc() {
DocumentApp.create('TEST_DOCUMENT');
}
But when I run it I get the error
Exception: You do not have permission to call DocumentApp.create. Required permissions: https://www.googleapis.com/auth/documents (linje 26).
In my google app scripts appscript.json I've added
"oauthScopes": [
"https://www.googleapis.com/auth/documents"
],
For the necessary permissions. But I'm still getting the same error. Anyone know why?
EDIT:
My createDoc() function (at the bottom)
How I call the createDoc() function
The error message
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|




