Oct 26, 2018

How to create a Google document by Google App script

See it in action here. 

// Create a new Google Doc named 'Hello, i88.ca!'
  var doc = DocumentApp.create('Hello, i88.ca!');

  // Access the body of the document, then add a paragraph.
  doc.getBody().appendParagraph('This document was created by Google Apps Script.');

  // Get the URL of the document.
  var url = doc.getUrl();