Google App-Script
G-Suite




個人 v.s. 企業

App script Overview
Google Apps Script is a rapid application development platform that makes it fast and easy to create business applications that integrate with G Suite

Script Project
...Your Codes...
Interaction




JS Engine
Dig into App script
Types of script

Standalone
Bound script

Web Apps


function doGet(e) {
var params = JSON.stringify(e);
return HtmlService.createHtmlOutput(params);
}
return

or

依附於某個G-Suite app instance之下的script
Add-ons Overview

要開發成add-on的script必須是standalone

Types of Add-ons
G-Suite add-on
Editor add-on

Install


Authorize
Use or manage them

Editor add-on usage preview

G-Suite add on



Differences

Extend Apps
v.s.
Editor add-ons extend one of the Google Drive editor applications.
UI creation

App Script Development
Manifest
An Apps Script project manifest is a special JSON file that specifies a basic project information that Apps Script needs to run the script successfully.
package.json的概念




Example
oAuth scope






Dependencies




App Script Resources & Services
Built-in Google Services


Advanced Google Services



Script Services


Utilities
This service provides utilities for string encoding/decoding, date formatting

URL fetch
This service allows scripts to access other resources on the web by fetching URLs.
A script can use the UrlFetch service to issue HTTP and HTTPS requests and receive responses.
Return class HTTPResponse

JDBC
This service allows scripts to connect to JDBC-compliant databases



HTML, XML, Content



Charts
This service allows users to create charts using Google chart tools and render them server side.

Script
This service provides access to script triggers and script publishing
提供各種控制event trigger的methods
如:Clock-trigger、各種editor-apps trigger builder

Cache
也可以處理cache!

Base
Logger interface & UI 操作

Create custom features like menus, dialogs, and sidebars
App Script Develop Environment
CLI - clasp
clasp lets you to develop your Apps Script projects locally. You can write code on your own computer and upload it to Apps Script when you're done.


clasp can help transpiling the files from .ts to .gs
Google App-Script
By ian Lai
Google App-Script
- 559