I am creating a google doc from apps script as follows:
var newDoc = DocumentApp.create(docName);
I want this new document to be created in an existing folder in my drive. I tried the following way:
var dir = DriveApp.getFolderById("folder-id");
dir.addFile(newDoc);
But I get the error as:
ReferenceError: "DocsList" is not defined.
Is there any way to create a new document in my existing folder or move my file to an existing folder via apps script? Any help will be appreciated.