Skip to content

Latest commit

 

History

History
90 lines (69 loc) · 5.36 KB

File metadata and controls

90 lines (69 loc) · 5.36 KB

Google Apps Script

Google Apps Script is A cloud-based JavaScript platform that lets you integrate with and automate tasks across Google products.

Google Apps Script

What can Apps Script do?

Apps Script is versatile. Among other things, you can:

  • Add custom menus, dialogs, and sidebars to Google Docs, Sheets, and Forms.
  • Write custom functions and macros for Google Sheets.
  • Publish web apps — either standalone or embedded in Google Sites.
  • Interact with other Google services, including AdSense, Analytics, Calendar, Drive, Gmail, and Maps.
  • Build add-ons and publish them to the Google Workspace Marketplace.

Google Apps Script in 60 seconds

Services Used

Spreadsheet Service

This service allows scripts to create, access, and modify Google Sheets files.

Classes Used

Name Brief description
SpreadsheetApp Access and create Google Sheets files.
Sheet Access and modify spreadsheet sheets.
Range Access and modify spreadsheet ranges.

Methods Used

Class SpreadsheetApp

Method Return Type Brief description
getActiveSheet() Sheet Gets the active sheet in a spreadsheet.

Class Sheet

Method Return Type Brief description
getRange(row, column) Range Gets the active sheet in a spreadsheet.

Class Range

Method Return Type Brief description
getValues() Object[][] Returns the rectangular grid of values for this range.

HTML Service

This service allows Apps Script applications to return HTML, usually as a user interface.

Classes Used

Name Brief description
HtmlService Service for returning HTML and other text content from a script.
HtmlTemplate A template object for dynamically constructing HTML.
HtmlOutput An HtmlOutput object that can be served from a script.

Methods Used

Class HtmlService

Method Return Type Brief description
createTemplateFromFile(filename) HtmlTemplate Creates a new HtmlTemplate object from a file in the code editor.

Class HtmlTemplate

Method Return Type Brief description
evaluate() HtmlOutput Evaluates this template and returns an HtmlOutput object.

Class HtmlOutput

Method Return Type Brief description
getContent() String Gets the content of this HtmlOutput.

Mail Service

This service allows scripts to send email on a user's behalf. Unlike Gmail Service, Mail Service's sole purpose is sending email; it cannot access a user's Gmail account.

Classes Used

Name Brief description
MailApp Sends email.

Methods Used

Class MailApp

Method Return Type Brief description
sendEmail(message) void Sends an email message.

HTML Email Templates

An email template is an HTML file composed of reusable code modules, making it as easy as copying and pasting your copy, links, and image URLs to create an email.

How to make them?

Follow this guide -> Create HTML Templates