I have an .html file in Google Drive. Is it possible to use it with HtmlService?
I know this code will render the Index.html file within the project.
function doGet() {
return HtmlService.createHtmlOutputFromFile('Index');
}
But how can I get it to render a file that is in Google Drive?
My idea is that users would collaborate on an .html file outside of the web-app and the web-app would render t.
If my understanding is correct, how about this modification? The flow of this modified script is as follows.
function doGet() {
var fileId = "###"; // Please set the fileID of HTML file on Google Drive.
var html = DriveApp.getFileById(fileId).getBlob().getDataAsString();
return HtmlService.createHtmlOutput(html);
}
If I misunderstood your question, I apologize.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With