Is there a way to save html text to a file in google drive using apps script? My app sends back an html string, which I want to save as an .html file into drive, as if I\'d
var url = 'YOUR PAGE;
var p = SitesApp.getPageByUrl(url);
var html = p.getHtmlContent();
var blob = DriveApp.createFile('dummy',html, 'text/html').getBlob();
var resource = {
title: 'YOUR FILE NAME',
convert: true,
mimeType: 'application/vnd.google-apps.document'
};
Drive.Files.insert(resource,blob);