I am developing a Google App Engine Python based Web application. I need to automatically create a new document in a folder in the Google Drive account of the currently logged user when he/she presses a button. I am trying to figure out what library to exploit. I am now using the Python Client Library 3.0 to manage the user's calendars but I can't see how to use them to create new docs and set up some initial content. It would be great if I could use some Javascript library but I am a bit confused about the many different (sometime depcreated) documentation I find on the Internet (i.e. Google Apps Script, Google DocsList, etc.).
You can try below code to create Google doc using Google App Script, you can add text, html content and images.
//Create document in google drive with given name, open the document and returns doc object
doc = DocumentApp.create('digest.doc');
//Get the document body
var body = doc.getBody();
//Insert some text into body
var text = body.editAsText();
text.insertText(0, 'This is sample text...\n');
You can refer this link for API documentation.