I am trying to publish a spreadsheet as a web app through the script code embedded in another spreadsheet.
- I want to copy a spreadsheet
- I want to publish the copied spreadsheet as a web app
- I want to retrieve the public url of the web app interface just created
- I want to get the result of the doGet() function embedded in the copied spreadsheet
Thanks to Tanaike's help I wrote this code:
// Copies the spreadsheet
var repliesFile = responseTemplate.makeCopy('risposte', newFolder);
// Publish the spreadsheet (Drive Api is enabled)
Drive.Revisions.update({published: true, publishedOutsideDomain: true, publishAuto: true}, repliesFile.getId(), 1);
var webAppUrl = "https://docs.google.com/spreadsheet/pub?key=" + repliesFile.getId();
Problem: using webAppUrl I can see the published spreadsheet but what I want is the html returned by the doGet() function in the copied spreadsheet. In a few words, the same interface I get if I publish the web app via 'Publish -> Deploy as Web App'. Is there a way to get it? A few images are attached (don't mind the template variables in the html template).
Thanks for all the help you can give me!



webApp.htmland the link to your previous post where you were helped by Tanaike? And maybe your spreadsheet after removing private information. - ziganotschka