I am creating a “Form” in Google Drive.
File newFile = new File();
newFile.setDescription(fileItemName);
newFile.setTitle(fileItemName);
newFile.setMimeType("application/vnd.google-apps.form");
insert = driveService.files().insert(newFile);
Folder, Document, Spreadsheet, Pesentation … works. But creating a Form creates an entry with icon “Form” and a link that shows up:
“We’re sorry.
The spreadsheet at this URL could not be found. Make sure that you have the right URL and that the owner of the spreadsheet hasn’t deleted it.
Find out more at the Google Docs Help Center.”
Programmatically creating a form is not supported by the API so that’s why the document doesn’t work properly, however, the API return a proper error message during creation instead of a success. I’ll follow up with the engineers and make sure this is addressed.