Join Scott Simpson for an in-depth discussion in this video Publishing your script as a web app, part of Up and Running with Google Apps Script.
- Apps Script makes it pretty easy to share your script…with the world as a web app.…A web app allows your script's logic…to control output to or accept input from…an HTTP connection,…just like a regular web app in .NET, PHP,…or something like that.…As with custom functions, the behaviors for a web app…are controlled through two functions with reserved names,…doGet (e) and doPost (e).…doGet (e) handles an HTTP GET request…and doPost (e) handles a POST request.…
For this example, I'll just handle a GET request…which is what a web server gets from a web browser…when someone requests a page.…Over here in my script, I'll add a function…doGet (e).…The (e) value that I'm passing in here…contains the URL parameters…which has some properties that developers…might be interested in.…You can find out more about those…on the Web Apps and Site Gadgets page.…For now, I'll just write a simple HTML response.…
Here, you can use a basic string or a reference in HTML file…as we did before in the video about dialogues and sidebars.…
First, learn how to use simple scripts to edit documents and spreadsheets, work with files in Drive, and find and send messages in Gmail. Then find out how to add custom functionality to your spreadsheets, and build user interface elements for your scripts, using menus, alerts, and dialogs. Finally, Scott shows how to share your work with others by publishing scripts as web apps.
- What is Google Apps Script?
- Understanding script types
- Logging and debugging your scripts
- Scripting common tasks
- Building custom spreadsheet functions
- Creating add-on functionality such as dialogs and sidebars
- Sharing your script as a web app