Building Web Apps with Google Apps Script

Google Apps Script (GAS) is a JavaScript-based scripting language developed by Google for light-weight application development in the Google Workspace platform. With GAS, you can automate tasks across Google products, create custom function…

Building Web Apps with Google Apps Script

Google Apps Script (GAS) is a JavaScript-based scripting language developed by Google for light-weight application development in the Google Workspace platform. With GAS, you can automate tasks across Google products, create custom functions for Google Sheets, and build web apps that integrate with Google Workspace. In this explanation, we will cover key terms and vocabulary related to building web apps with Google Apps Script in the context of the Professional Certificate in Google Apps Script Advanced Techniques.

1. **Web Apps**: Web apps are interactive web pages that can be accessed through a web browser. With Google Apps Script, you can build web apps that integrate with Google Workspace and provide additional functionality to users. 2. **HTML Service**: HTML Service is a Google Apps Script service that allows you to create HTML-based web apps. With HTML Service, you can create custom user interfaces, buttons, and forms that can interact with Google Apps Script functions. 3. **Google Apps Script Functions**: Google Apps Script functions are pieces of code that perform specific tasks. Functions can be called from HTML Service, Google Sheets, or other Google Apps Script projects. Functions can take input parameters and return output values. 4. **Google Workspace**: Google Workspace is a suite of cloud-based productivity and collaboration tools developed by Google. Google Workspace includes Google Sheets, Google Docs, Google Slides, and other tools that can be automated with Google Apps Script. 5. **Google Sheets**: Google Sheets is a spreadsheet program included in Google Workspace. With Google Sheets, you can create and edit spreadsheets online, and collaborate with others in real-time. Google Apps Script can be used to automate tasks in Google Sheets, such as data entry, data analysis, and report generation. 6. **Google Docs**: Google Docs is a word processor included in Google Workspace. With Google Docs, you can create and edit documents online, and collaborate with others in real-time. Google Apps Script can be used to automate tasks in Google Docs, such as formatting, document generation, and data import/export. 7. **Google Slides**: Google Slides is a presentation program included in Google Workspace. With Google Slides, you can create and edit presentations online, and collaborate with others in real-time. Google Apps Script can be used to automate tasks in Google Slides, such as slide creation, formatting, and data import/export. 8. **Google Apps Script Triggers**: Google Apps Script triggers are automated events that can be used to run Google Apps Script functions at specific times or in response to specific events. Triggers can be used to automate tasks, such as sending emails, updating spreadsheets, or running reports. 9. **Google Apps Script Web App Deployment**: Google Apps Script web apps can be deployed to the web, allowing users to access them through a web browser. Web app deployment options include executing the app as the user accessing the web app or as the script owner, and allowing users to access the app without requiring login or with requiring login. 10. **Google Apps Script HTML Templated Literals**: Google Apps Script HTML Templated Literals are a way to embed Google Apps Script variables and functions into HTML code. With HTML Templated Literals, you can create dynamic HTML pages that can interact with Google Apps Script functions. 11. **Google Apps Script JDBC Service**: Google Apps Script JDBC Service is a Google Apps Script service that allows you to connect to external databases and perform database operations, such as querying, inserting, updating, and deleting records. 12. **Google Apps Script OAuth2 Service**: Google Apps Script OAuth2 Service is a Google Apps Script service that allows you to authenticate and authorize third-party APIs and services. With OAuth2 Service, you can access data and functionality from external services, such as Google Analytics, Twitter, or Salesforce. 13. **Google Apps Script Content Service**: Google Apps Script Content Service is a Google Apps Script service that allows you to serve files, such as images, PDFs, or CSS stylesheets, from Google Drive. With Content Service, you can create rich and interactive web apps that can display multimedia content. 14. **Google Apps Script Ui Service**: Google Apps Script Ui Service is a Google Apps Script service that allows you to create custom user interfaces, such as dialogs, sidebars, and menus, in Google Workspace apps. With Ui Service, you can create custom functionality and workflows that are tailored to your users' needs.

Example:

Suppose you want to create a web app that allows users to search for movies and display the results in a table. You can use Google Apps Script to create the web app and perform the following steps:

1. Create a new Google Apps Script project and create a function that queries the Movie Database API and returns the results. 2. Use the Google Apps Script Content Service to serve the HTML, CSS, and JavaScript files that make up the web app. 3. Use the Google Apps Script HTML Service to create a custom user interface that includes a search bar and a table. 4. Use the Google Apps Script JDBC Service to connect to a database and store the movie data. 5. Use the Google Apps Script Ui Service to create custom functionality, such as sorting and filtering the table. 6. Deploy the web app to the web and share the link with users.

Challenge:

Create a web app that allows users to create and manage tasks. The web app should include the following functionality:

1. A form for creating new tasks. 2. A table for displaying existing tasks. 3. The ability to edit and delete tasks. 4. The ability to mark tasks as complete. 5. The ability to filter tasks by status.

To create the web app, you can use Google Apps Script and perform the following steps:

1. Create a new Google Apps Script project and create a function that handles the creation, editing, deletion, and marking as complete of tasks. 2. Use the Google Apps Script Content Service to serve the HTML, CSS, and JavaScript files that make up the web app. 3. Use the Google Apps Script HTML Service to create a custom user interface that includes the form and the table. 4. Use the Google Apps Script JDBC Service to connect to a database and store the task data. 5. Use the Google Apps Script Ui Service to create custom functionality, such as sorting and filtering the table. 6. Deploy the web app to the web and share the link with users.

In conclusion, Google Apps Script is a powerful tool for building web apps that integrate with Google Workspace. By understanding key terms and vocabulary, such as web apps, HTML Service, Google Apps Script Functions, Google Workspace, Google Sheets, Google Docs, Google Slides, Google Apps Script Triggers, Google Apps Script Web App Deployment, Google Apps Script HTML Templated Literals, Google Apps Script JDBC Service, Google Apps Script OAuth2 Service, Google Apps Script Content Service, and Google Apps Script Ui Service, you can create custom functionality and workflows that are tailored to your users' needs. With practice and experimentation, you can become proficient in building web apps with Google Apps Script and unlock the full potential of the Google Workspace platform.

Key takeaways

  • In this explanation, we will cover key terms and vocabulary related to building web apps with Google Apps Script in the context of the Professional Certificate in Google Apps Script Advanced Techniques.
  • **Google Apps Script Ui Service**: Google Apps Script Ui Service is a Google Apps Script service that allows you to create custom user interfaces, such as dialogs, sidebars, and menus, in Google Workspace apps.
  • Suppose you want to create a web app that allows users to search for movies and display the results in a table.
  • Create a new Google Apps Script project and create a function that queries the Movie Database API and returns the results.
  • Create a web app that allows users to create and manage tasks.
  • Create a new Google Apps Script project and create a function that handles the creation, editing, deletion, and marking as complete of tasks.
  • With practice and experimentation, you can become proficient in building web apps with Google Apps Script and unlock the full potential of the Google Workspace platform.
June 2026 intake · open enrolment
from £90 GBP
Enrol