SlideShare a Scribd company logo
1 of 33
Download to read offline
GOOGLE APPS SCRIPT
INTRODUCTION
HELLO!
I am Cage Chung
I am here because I like to share my experiences.
You can find me at https://kaichu.io / QNAP 雲端應用部資深工程師
https://www.facebook.com/groups/GCPUG.TW/
https://plus.google.com/u/0/communities/116100913832589966421
[您知道”GCPUG”要怎麼唸嗎?為什麼會有一隻狗在 Logo裡面呢?]
Google Cloud Platform User Group的縮寫是GCPUG
GCPUG直接唸成G.C.P.U.G?當然可以!
但它也可以分開來,唸成 G.C. PUG喔~
Pug,指的是巴哥犬,所以 GCPUG的Logo中間才會有一隻可愛的巴哥犬喲。
下次聽到別人說G.C. PUG 的時候,您就可以大聲 說:「我也是G.C. PUG社團成員!」
Outline
◉ What’s Google Apps Script?
◉ Study Cases
◉ CoffeMap
◉ i18n Helper
◉ Trips & Tips
◉ Study information
What’s Google App Scripts
Let’s start with the first set of slides 1
“Google Apps Script is a scripting
language based on JavaScript that
lets you do new and cool things with
Google Apps
One platform in the cloud
Sheet
Docs
Slide
Forms
Sites
Drive
Gmail Calendar
Contacts
Groups
Maps
Translate
Add-ons for Google Apps
Sheet Docs Forms
Sheet Add-ons
Slide Add-ons
Docs Add-ons
Add-ons for Google Apps - continue
G Suite Service
◉ Calendar
◉ Contacts
◉ Document
◉ Drive
◉ Forms
◉ Gmail
◉ Groups
◉ Language
◉ Maps
◉ Site
◉ Slides
◉ Spreadsheet
Advanced Google Service
◉ Admin SDK
◉ AdSence
◉ Analytics
◉ Apps Activity
◉ BigQuery
◉ Calendar
◉ Classroom
◉ Drive
◉ DoubleClick Campaigns
◉ Fusion Tables
◉ Gmail
◉ Google+
◉ Mirror
◉ Prediction
◉ Sheets
◉ Shopping Content
◉ Slides
◉ Tasks
◉ Tag Manager
◉ URL Shortener
◉ Youtube
Script Services
◉ Base
◉ Cache
◉ Card
◉ Charts
◉ Content
◉ HTML
◉ JDBC
◉ Lock
◉ Mail
◉ Optimization
◉ Properties
◉ Script
◉ URL Fetch
◉ Utilities
◉ XML
Type of Scripts - Standalone
// Log the name of every file in the user's Drive that modified after February 28,
// 2013 whose name contains "untitled".
function doAction(){
var files = DriveApp.searchFiles(
'modifiedDate > "2015-01-01" and title contains "untitled"');
while (files.hasNext()) {
var file = files.next();
Logger.log(file.getName());
}
}
Standalone
is any script that is not bound to a Google Sheets, Docs, Slides or Forms file or Google
Sites.
[iOS Taipei - Apps Script - Type of Scripts - Standalone](https://goo.gl/oj8WVO)
Type of Scripts - Bound to G Suite Documents
function doAction(range) {
// Get the active spreadsheet and the active sheet
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getActiveSheet();
// Get the range of cells that store employee data.
var libraryDataRange = sheet.getRange(range);
var libraryObjects = getRowsData(sheet, libraryDataRange, 1);
libraryObjects.forEach(function (row, index) {
var latlng = getLatitudeLongitude(row.address)
if (latlng) {
sheet.getRange(index + 2, 5, 1, 1).setValue(latlng.lat);
sheet.getRange(index + 2, 6, 1, 1).setValue(latlng.lng);
}
});
}
Bound to Google Apps
A script is bound to a Google Sheets, Docs, or Forms file.
Type of Scripts - Bound to G Suite Documents. continue
Trigger and Events
Triggers let Apps Script run a function automatically when a certain event,
like opening a document, occurs.
[coffeemap-testing-form - Google Sheets](https://goo.gl/ZAIOtT)
[coffeemap](https://goo.gl/Wb91tW) quick setup form
Type of Scripts - Web Apps and Site Gadgets
Web Apps and Site Gadgets
If you build a user interface for a
script, you can publish the script
as a web app
◉ It contains a doGet(e) and
doPost(e) function.
◉ The function returns an
HTML service HtmlOutput
object or a Content service
TextOutput object.
Type of Scripts - Web Apps and Site Gadgets. continue
function doGet() {
var ss = SpreadsheetApp.openById('1QgsaX4Vn_lIwLFRC_iHs6gmJYIP4y-35nVqQOpz4B0s');
var sheet = ss.getSheets()[0];
// Get the range of cells that store employee data.
var employeeDataRange = ss.getRangeByName("employeeData");
// For every row of employee data, generate an employee object.
var employeeObjects = getRowsData(sheet, employeeDataRange);
return ContentService.createTextOutput(JSON.stringify(employeeObjects)).setMimeType(ContentService.MimeType.JSON);
}
$ curl -L https://script.google.com/macros/s/AKfycbz4Z2dm-MUidB98H5XbekL0LZnvPVRM3ekpG-NSrScc9tvI87A/exec
[{"level":1,"id":"A00","parent":"root","type":"D","title":"資訊研發
處","email":"A00@aa.bb.cc"},{"level":2,"id":"A10","parent":"A00","type":"D","title":"資訊研發
部","email":"A10@aa.bb.cc"},{"level":3,"id":"SunnyHu","parent":"A10","type":"U","title":"胡適 ...
Study Cases
Let’s start with the second set of slides 2
Coffee map
function getLatitudeLongitude(address) {
var geocode = Maps.newGeocoder().geocode(address);
if (geocode.results.length)
return geocode.results[0].geometry.location;
else
return null;
}
i18n helper
function exportJson(data) {
google.script.run.withSuccessHandler(handleDownload)
.withFailureHandler(showError).exportJobs(data);
}
function handleDownload(data) {
var blob = new Blob([new Uint8Array(data.content)], { type: "octet/stream" });
var link = document.createElement('a');
link.download = data.fileName;
link.href = window.URL.createObjectURL(blob);
link.click();
$('#export').text('Export')
}
i18n helper. continue
function exportJobs(data) {
var blobs = [];
...
data.columns.forEach(function (column) {
blobs.push(getBlob(ss, data.sheet, column.name, parseInt(column.index, 10) + 1));
})
var now = new Date();
var datetime = Utilities.formatDate(now, 'Asia/Taipei', 'yyyyMMddHHmm');
var fileName = ass.getName() + "_" + ss.getName() + "_i18n_" + datetime + ".zip";
var zip = Utilities.zip(blobs, fileName);
return {
fileName: fileName,
content: zip.getBytes(),
}
}
function getBlob(ss, sheetName, columnName, columnIndex) {
content = getContent(ss, columnName, columnIndex)
return Utilities.newBlob(content, "text/javascript", columnName + ".js")
}
i18n files
Trips & Tips
Let’s start with the third set of slides 3
“gapps (Google Apps Script)
The easiest way to develop Google
Apps Script projects
$ gapps init 1k6eNig3veKXV_7_vQFcyQZDrDmB_qrJc5dlFRaQwDaM5ATaIMmclB-oP
$ gapps auth client_secret_566039949734-6b7kpll6rd4vil7896depbtt8t7fpc09.apps.googleusercontent.com.json
$ gapps push
gapps
STUDY INFORMATION
Let’s start with the fourth set of slides 4
Study info
◉ [Google apps script - simon
su](http://www.slideshare.net/peihsinsu/google-apps-script-24469585)
◉ [entaq/GoogleAppsScript](https://github.com/entaq/GoogleAppsScript)
◉ [Script It! with Android -
YouTube](https://www.youtube.com/watch?v=RSgMEtRl0sw&list=PL68F511F6
E3C122EB)
◉ [Apps Script Crash Course: ContentService
YouTube](https://www.youtube.com/watch?v=JRGzVdliQOQ&list=PL68F511F6
E3C122EB)
◉ [Apps Script | Google Developers](https://developers.google.com/apps-script/)
[Google Apps Script 入門與應用 - 資訊學科中
心](http://icerc.tnssh.tn.edu.tw/download/rs/1030429_3.pdf)
Study information - examples
◉ [Generate EPUB file with Google Apps Scripts |
blog.softapalvelin.com](http://blog.softapalvelin.com/2013/02/generate-epub-file-wi
th-google-app.html)
◉ [RSSToEPUB](https://goo.gl/YCDDBo)
[google/google-apps-script-samples](https://github.com/google/google-apps-script-s
amples)
◉ [Tutorials | Apps Script | Google
Developers](https://developers.google.com/apps-script/articles)
◉ [Parsing HTML - Google Apps Script
Examples](https://sites.google.com/site/scriptsexamples/learn-by-example/parsing-
html)
Study information - Tools
◉ [danthareja/node-google-apps-script: The easiest way to develop Google Apps Script
projects](https://github.com/danthareja/node-google-apps-script)
THANKS!
Any questions?
You can find me at
https://kaichu.io / cage.chung@gmail.com

More Related Content

What's hot

Towards the perfect Drupal Dev Machine
Towards the perfect Drupal Dev MachineTowards the perfect Drupal Dev Machine
Towards the perfect Drupal Dev MachineKrimson
 
PyGrunn - Buildout presentation
PyGrunn - Buildout presentationPyGrunn - Buildout presentation
PyGrunn - Buildout presentationKim Chee Leong
 
G*なクラウド 雲のかなたに ショートバージョン
G*なクラウド 雲のかなたに ショートバージョンG*なクラウド 雲のかなたに ショートバージョン
G*なクラウド 雲のかなたに ショートバージョンTsuyoshi Yamamoto
 
Bfg Ploneconf Oct2008
Bfg Ploneconf Oct2008Bfg Ploneconf Oct2008
Bfg Ploneconf Oct2008Jeffrey Clark
 
Introduction to zc.buildout
Introduction to zc.buildoutIntroduction to zc.buildout
Introduction to zc.buildoutRicardo Newbery
 
Pimp my dev box (Friday Training at Itnig)
Pimp my dev box (Friday Training at Itnig)Pimp my dev box (Friday Training at Itnig)
Pimp my dev box (Friday Training at Itnig)itnig
 
Django & Buildout (en)
Django & Buildout (en)Django & Buildout (en)
Django & Buildout (en)zerok
 
Google app engine python
Google app engine   pythonGoogle app engine   python
Google app engine pythonEueung Mulyana
 
Using Composer with Drupal and Drush
Using Composer with Drupal and DrushUsing Composer with Drupal and Drush
Using Composer with Drupal and DrushPantheon
 
Gael Le Mignot How To Minimize Cpu And Memory Usage Of Zope And Plone Appli...
Gael Le Mignot   How To Minimize Cpu And Memory Usage Of Zope And Plone Appli...Gael Le Mignot   How To Minimize Cpu And Memory Usage Of Zope And Plone Appli...
Gael Le Mignot How To Minimize Cpu And Memory Usage Of Zope And Plone Appli...Vincenzo Barone
 
Using Backbone.js with Drupal 7 and 8
Using Backbone.js with Drupal 7 and 8Using Backbone.js with Drupal 7 and 8
Using Backbone.js with Drupal 7 and 8Ovadiah Myrgorod
 
Grailsx@ロンドンへ行ってきた報告。
Grailsx@ロンドンへ行ってきた報告。Grailsx@ロンドンへ行ってきた報告。
Grailsx@ロンドンへ行ってきた報告。Tsuyoshi Yamamoto
 
Grunt - The JavaScript Task Runner
Grunt - The JavaScript Task RunnerGrunt - The JavaScript Task Runner
Grunt - The JavaScript Task RunnerMohammed Arif
 
How to Use the Command Line to Increase Speed of Development
How to Use the Command Line to Increase Speed of DevelopmentHow to Use the Command Line to Increase Speed of Development
How to Use the Command Line to Increase Speed of DevelopmentAcquia
 
GTFO: Git Theory For OpenSource
GTFO: Git Theory For OpenSourceGTFO: Git Theory For OpenSource
GTFO: Git Theory For OpenSourceForest Mars
 
Introduction to Express and Grunt
Introduction to Express and GruntIntroduction to Express and Grunt
Introduction to Express and GruntPeter deHaan
 
20141030 html5j-firefox os-deviceapi
20141030 html5j-firefox os-deviceapi20141030 html5j-firefox os-deviceapi
20141030 html5j-firefox os-deviceapiNoritada Shimizu
 

What's hot (20)

Towards the perfect Drupal Dev Machine
Towards the perfect Drupal Dev MachineTowards the perfect Drupal Dev Machine
Towards the perfect Drupal Dev Machine
 
PyGrunn - Buildout presentation
PyGrunn - Buildout presentationPyGrunn - Buildout presentation
PyGrunn - Buildout presentation
 
G*なクラウド 雲のかなたに ショートバージョン
G*なクラウド 雲のかなたに ショートバージョンG*なクラウド 雲のかなたに ショートバージョン
G*なクラウド 雲のかなたに ショートバージョン
 
Stupid Buildout Tricks
Stupid Buildout TricksStupid Buildout Tricks
Stupid Buildout Tricks
 
Bfg Ploneconf Oct2008
Bfg Ploneconf Oct2008Bfg Ploneconf Oct2008
Bfg Ploneconf Oct2008
 
Introduction to zc.buildout
Introduction to zc.buildoutIntroduction to zc.buildout
Introduction to zc.buildout
 
Pimp my dev box (Friday Training at Itnig)
Pimp my dev box (Friday Training at Itnig)Pimp my dev box (Friday Training at Itnig)
Pimp my dev box (Friday Training at Itnig)
 
Zenoss: Buildout
Zenoss: BuildoutZenoss: Buildout
Zenoss: Buildout
 
Django & Buildout (en)
Django & Buildout (en)Django & Buildout (en)
Django & Buildout (en)
 
Google app engine python
Google app engine   pythonGoogle app engine   python
Google app engine python
 
Using Composer with Drupal and Drush
Using Composer with Drupal and DrushUsing Composer with Drupal and Drush
Using Composer with Drupal and Drush
 
Gael Le Mignot How To Minimize Cpu And Memory Usage Of Zope And Plone Appli...
Gael Le Mignot   How To Minimize Cpu And Memory Usage Of Zope And Plone Appli...Gael Le Mignot   How To Minimize Cpu And Memory Usage Of Zope And Plone Appli...
Gael Le Mignot How To Minimize Cpu And Memory Usage Of Zope And Plone Appli...
 
Using Backbone.js with Drupal 7 and 8
Using Backbone.js with Drupal 7 and 8Using Backbone.js with Drupal 7 and 8
Using Backbone.js with Drupal 7 and 8
 
Grailsx@ロンドンへ行ってきた報告。
Grailsx@ロンドンへ行ってきた報告。Grailsx@ロンドンへ行ってきた報告。
Grailsx@ロンドンへ行ってきた報告。
 
Grunt - The JavaScript Task Runner
Grunt - The JavaScript Task RunnerGrunt - The JavaScript Task Runner
Grunt - The JavaScript Task Runner
 
How to Use the Command Line to Increase Speed of Development
How to Use the Command Line to Increase Speed of DevelopmentHow to Use the Command Line to Increase Speed of Development
How to Use the Command Line to Increase Speed of Development
 
GTFO: Git Theory For OpenSource
GTFO: Git Theory For OpenSourceGTFO: Git Theory For OpenSource
GTFO: Git Theory For OpenSource
 
Introduction to Express and Grunt
Introduction to Express and GruntIntroduction to Express and Grunt
Introduction to Express and Grunt
 
RingoJS
RingoJSRingoJS
RingoJS
 
20141030 html5j-firefox os-deviceapi
20141030 html5j-firefox os-deviceapi20141030 html5j-firefox os-deviceapi
20141030 html5j-firefox os-deviceapi
 

Viewers also liked

60分鐘完送百萬edm,背後雲端ci/cd實戰大公開
60分鐘完送百萬edm,背後雲端ci/cd實戰大公開60分鐘完送百萬edm,背後雲端ci/cd實戰大公開
60分鐘完送百萬edm,背後雲端ci/cd實戰大公開KAI CHU CHUNG
 
Google IoT Core 初體驗
Google IoT Core 初體驗Google IoT Core 初體驗
Google IoT Core 初體驗Simon Su
 
JSDC 2017 - 使用google cloud 從雲到端,動手刻個IoT
JSDC 2017 - 使用google cloud 從雲到端,動手刻個IoTJSDC 2017 - 使用google cloud 從雲到端,動手刻個IoT
JSDC 2017 - 使用google cloud 從雲到端,動手刻個IoTSimon Su
 
Introduction to chrome extension development
Introduction to chrome extension developmentIntroduction to chrome extension development
Introduction to chrome extension developmentKAI CHU CHUNG
 
Google apps script introduction
Google apps script introductionGoogle apps script introduction
Google apps script introductionKAI CHU CHUNG
 
Django oscar introduction
Django oscar introductionDjango oscar introduction
Django oscar introductionKAI CHU CHUNG
 
Nas 也可以揀土豆
Nas 也可以揀土豆Nas 也可以揀土豆
Nas 也可以揀土豆KAI CHU CHUNG
 
Gae managed vm introduction
Gae managed vm introductionGae managed vm introduction
Gae managed vm introductionKAI CHU CHUNG
 
Continuous Integration & Continuous Delivery with GCP
Continuous Integration & Continuous Delivery with GCPContinuous Integration & Continuous Delivery with GCP
Continuous Integration & Continuous Delivery with GCPKAI CHU CHUNG
 
痞客趴趴走 Waldo
痞客趴趴走   Waldo痞客趴趴走   Waldo
痞客趴趴走 WaldoKAI CHU CHUNG
 
Google app engine (gae) 演進史
Google app engine (gae) 演進史Google app engine (gae) 演進史
Google app engine (gae) 演進史KAI CHU CHUNG
 
Devoxx 2017 "Continuous Delivery with Containers: The Good, the Bad, and the ...
Devoxx 2017 "Continuous Delivery with Containers: The Good, the Bad, and the ...Devoxx 2017 "Continuous Delivery with Containers: The Good, the Bad, and the ...
Devoxx 2017 "Continuous Delivery with Containers: The Good, the Bad, and the ...Daniel Bryant
 

Viewers also liked (14)

60分鐘完送百萬edm,背後雲端ci/cd實戰大公開
60分鐘完送百萬edm,背後雲端ci/cd實戰大公開60分鐘完送百萬edm,背後雲端ci/cd實戰大公開
60分鐘完送百萬edm,背後雲端ci/cd實戰大公開
 
Google IoT Core 初體驗
Google IoT Core 初體驗Google IoT Core 初體驗
Google IoT Core 初體驗
 
Vim Hacks
Vim HacksVim Hacks
Vim Hacks
 
JSDC 2017 - 使用google cloud 從雲到端,動手刻個IoT
JSDC 2017 - 使用google cloud 從雲到端,動手刻個IoTJSDC 2017 - 使用google cloud 從雲到端,動手刻個IoT
JSDC 2017 - 使用google cloud 從雲到端,動手刻個IoT
 
Introduction to chrome extension development
Introduction to chrome extension developmentIntroduction to chrome extension development
Introduction to chrome extension development
 
Google apps script introduction
Google apps script introductionGoogle apps script introduction
Google apps script introduction
 
Django oscar introduction
Django oscar introductionDjango oscar introduction
Django oscar introduction
 
Nas 也可以揀土豆
Nas 也可以揀土豆Nas 也可以揀土豆
Nas 也可以揀土豆
 
Gae managed vm introduction
Gae managed vm introductionGae managed vm introduction
Gae managed vm introduction
 
Waldo-gcp
Waldo-gcpWaldo-gcp
Waldo-gcp
 
Continuous Integration & Continuous Delivery with GCP
Continuous Integration & Continuous Delivery with GCPContinuous Integration & Continuous Delivery with GCP
Continuous Integration & Continuous Delivery with GCP
 
痞客趴趴走 Waldo
痞客趴趴走   Waldo痞客趴趴走   Waldo
痞客趴趴走 Waldo
 
Google app engine (gae) 演進史
Google app engine (gae) 演進史Google app engine (gae) 演進史
Google app engine (gae) 演進史
 
Devoxx 2017 "Continuous Delivery with Containers: The Good, the Bad, and the ...
Devoxx 2017 "Continuous Delivery with Containers: The Good, the Bad, and the ...Devoxx 2017 "Continuous Delivery with Containers: The Good, the Bad, and the ...
Devoxx 2017 "Continuous Delivery with Containers: The Good, the Bad, and the ...
 

Similar to Google apps script introduction

Lambda Architecture using Google Cloud plus Apps
Lambda Architecture using Google Cloud plus AppsLambda Architecture using Google Cloud plus Apps
Lambda Architecture using Google Cloud plus AppsSimon Su
 
Visual Exploration of Large Data sets with D3, crossfilter and dc.js
Visual Exploration of Large Data sets with D3, crossfilter and dc.jsVisual Exploration of Large Data sets with D3, crossfilter and dc.js
Visual Exploration of Large Data sets with D3, crossfilter and dc.jsFlorian Georg
 
Groovy Introduction - JAX Germany - 2008
Groovy Introduction - JAX Germany - 2008Groovy Introduction - JAX Germany - 2008
Groovy Introduction - JAX Germany - 2008Guillaume Laforge
 
Session 40 : SAGA Overview and Introduction
Session 40 : SAGA Overview and Introduction Session 40 : SAGA Overview and Introduction
Session 40 : SAGA Overview and Introduction ISSGC Summer School
 
Introduction to Apache Pig
Introduction to Apache PigIntroduction to Apache Pig
Introduction to Apache PigJason Shao
 
Google: Drive, Documents and Apps Script - How to work efficiently and happily
Google:  Drive, Documents  and Apps Script - How to work efficiently and happilyGoogle:  Drive, Documents  and Apps Script - How to work efficiently and happily
Google: Drive, Documents and Apps Script - How to work efficiently and happilyAlessandra Santi
 
AWS Hadoop and PIG and overview
AWS Hadoop and PIG and overviewAWS Hadoop and PIG and overview
AWS Hadoop and PIG and overviewDan Morrill
 
Groovy Update - JavaPolis 2007
Groovy Update - JavaPolis 2007Groovy Update - JavaPolis 2007
Groovy Update - JavaPolis 2007Guillaume Laforge
 
BDX 2015 - Scaling out big-data computation & machine learning using Pig, Pyt...
BDX 2015 - Scaling out big-data computation & machine learning using Pig, Pyt...BDX 2015 - Scaling out big-data computation & machine learning using Pig, Pyt...
BDX 2015 - Scaling out big-data computation & machine learning using Pig, Pyt...Ron Reiter
 
PyWPS at COST WPS Workshop
PyWPS at COST WPS WorkshopPyWPS at COST WPS Workshop
PyWPS at COST WPS WorkshopJachym Cepicky
 
Using Google (Cloud) APIs
Using Google (Cloud) APIsUsing Google (Cloud) APIs
Using Google (Cloud) APIswesley chun
 
Deploying Your Favorite Web App To AWS Lambda with Apex up
Deploying Your Favorite Web App To AWS Lambda with Apex upDeploying Your Favorite Web App To AWS Lambda with Apex up
Deploying Your Favorite Web App To AWS Lambda with Apex upRiza Fahmi
 
"Xapi-lang For declarative code generation" By James Nelson
"Xapi-lang For declarative code generation" By James Nelson"Xapi-lang For declarative code generation" By James Nelson
"Xapi-lang For declarative code generation" By James NelsonGWTcon
 
Introduction to Scalding and Monoids
Introduction to Scalding and MonoidsIntroduction to Scalding and Monoids
Introduction to Scalding and MonoidsHugo Gävert
 
LISA Qooxdoo Tutorial Handouts
LISA Qooxdoo Tutorial HandoutsLISA Qooxdoo Tutorial Handouts
LISA Qooxdoo Tutorial HandoutsTobias Oetiker
 
Big Data Hadoop Training
Big Data Hadoop TrainingBig Data Hadoop Training
Big Data Hadoop Trainingstratapps
 

Similar to Google apps script introduction (20)

Lambda Architecture using Google Cloud plus Apps
Lambda Architecture using Google Cloud plus AppsLambda Architecture using Google Cloud plus Apps
Lambda Architecture using Google Cloud plus Apps
 
Visual Exploration of Large Data sets with D3, crossfilter and dc.js
Visual Exploration of Large Data sets with D3, crossfilter and dc.jsVisual Exploration of Large Data sets with D3, crossfilter and dc.js
Visual Exploration of Large Data sets with D3, crossfilter and dc.js
 
Groovy Introduction - JAX Germany - 2008
Groovy Introduction - JAX Germany - 2008Groovy Introduction - JAX Germany - 2008
Groovy Introduction - JAX Germany - 2008
 
Session 40 : SAGA Overview and Introduction
Session 40 : SAGA Overview and Introduction Session 40 : SAGA Overview and Introduction
Session 40 : SAGA Overview and Introduction
 
Introduction to Apache Pig
Introduction to Apache PigIntroduction to Apache Pig
Introduction to Apache Pig
 
Google: Drive, Documents and Apps Script - How to work efficiently and happily
Google:  Drive, Documents  and Apps Script - How to work efficiently and happilyGoogle:  Drive, Documents  and Apps Script - How to work efficiently and happily
Google: Drive, Documents and Apps Script - How to work efficiently and happily
 
AWS Hadoop and PIG and overview
AWS Hadoop and PIG and overviewAWS Hadoop and PIG and overview
AWS Hadoop and PIG and overview
 
Groovy Update - JavaPolis 2007
Groovy Update - JavaPolis 2007Groovy Update - JavaPolis 2007
Groovy Update - JavaPolis 2007
 
BDX 2015 - Scaling out big-data computation & machine learning using Pig, Pyt...
BDX 2015 - Scaling out big-data computation & machine learning using Pig, Pyt...BDX 2015 - Scaling out big-data computation & machine learning using Pig, Pyt...
BDX 2015 - Scaling out big-data computation & machine learning using Pig, Pyt...
 
Coding Ajax
Coding AjaxCoding Ajax
Coding Ajax
 
Coding Ajax
Coding AjaxCoding Ajax
Coding Ajax
 
PyWPS at COST WPS Workshop
PyWPS at COST WPS WorkshopPyWPS at COST WPS Workshop
PyWPS at COST WPS Workshop
 
Using Google (Cloud) APIs
Using Google (Cloud) APIsUsing Google (Cloud) APIs
Using Google (Cloud) APIs
 
Deploying Your Favorite Web App To AWS Lambda with Apex up
Deploying Your Favorite Web App To AWS Lambda with Apex upDeploying Your Favorite Web App To AWS Lambda with Apex up
Deploying Your Favorite Web App To AWS Lambda with Apex up
 
"Xapi-lang For declarative code generation" By James Nelson
"Xapi-lang For declarative code generation" By James Nelson"Xapi-lang For declarative code generation" By James Nelson
"Xapi-lang For declarative code generation" By James Nelson
 
Introduction to Scalding and Monoids
Introduction to Scalding and MonoidsIntroduction to Scalding and Monoids
Introduction to Scalding and Monoids
 
LISA Qooxdoo Tutorial Handouts
LISA Qooxdoo Tutorial HandoutsLISA Qooxdoo Tutorial Handouts
LISA Qooxdoo Tutorial Handouts
 
Grooscript greach 2015
Grooscript greach 2015Grooscript greach 2015
Grooscript greach 2015
 
Big Data Hadoop Training
Big Data Hadoop TrainingBig Data Hadoop Training
Big Data Hadoop Training
 
Writing Pluggable Software
Writing Pluggable SoftwareWriting Pluggable Software
Writing Pluggable Software
 

More from KAI CHU CHUNG

Devfest 2023 - Service Weaver Introduction - Taipei.pdf
Devfest 2023 - Service Weaver Introduction - Taipei.pdfDevfest 2023 - Service Weaver Introduction - Taipei.pdf
Devfest 2023 - Service Weaver Introduction - Taipei.pdfKAI CHU CHUNG
 
DevFest 2022 - Skaffold 2 Deep Dive Taipei.pdf
DevFest 2022 - Skaffold 2 Deep Dive Taipei.pdfDevFest 2022 - Skaffold 2 Deep Dive Taipei.pdf
DevFest 2022 - Skaffold 2 Deep Dive Taipei.pdfKAI CHU CHUNG
 
DevFest 2022 - Cloud Workstation Introduction TaiChung
DevFest 2022 - Cloud Workstation Introduction TaiChungDevFest 2022 - Cloud Workstation Introduction TaiChung
DevFest 2022 - Cloud Workstation Introduction TaiChungKAI CHU CHUNG
 
Devfest 2021' - Artifact Registry Introduction (Taipei)
Devfest 2021' - Artifact Registry Introduction (Taipei)Devfest 2021' - Artifact Registry Introduction (Taipei)
Devfest 2021' - Artifact Registry Introduction (Taipei)KAI CHU CHUNG
 
Coscup x ruby conf tw 2021 google cloud buildpacks 剖析與實踐
Coscup x ruby conf tw 2021  google cloud buildpacks 剖析與實踐Coscup x ruby conf tw 2021  google cloud buildpacks 剖析與實踐
Coscup x ruby conf tw 2021 google cloud buildpacks 剖析與實踐KAI CHU CHUNG
 
Velero search & practice 20210609
Velero search & practice 20210609Velero search & practice 20210609
Velero search & practice 20210609KAI CHU CHUNG
 
Gdg cloud taipei ddt meetup #53 buildpack
Gdg cloud taipei ddt meetup #53 buildpackGdg cloud taipei ddt meetup #53 buildpack
Gdg cloud taipei ddt meetup #53 buildpackKAI CHU CHUNG
 
GDG Cloud Taipei: Meetup #52 - Istio Security: API Authorization
GDG Cloud Taipei: Meetup #52 - Istio Security: API AuthorizationGDG Cloud Taipei: Meetup #52 - Istio Security: API Authorization
GDG Cloud Taipei: Meetup #52 - Istio Security: API AuthorizationKAI CHU CHUNG
 
如何透過 Go-kit 快速搭建微服務架構應用程式實戰
如何透過 Go-kit 快速搭建微服務架構應用程式實戰如何透過 Go-kit 快速搭建微服務架構應用程式實戰
如何透過 Go-kit 快速搭建微服務架構應用程式實戰KAI CHU CHUNG
 
Dev fest 2020 taiwan how to debug microservices on kubernetes as a pros (ht...
Dev fest 2020 taiwan   how to debug microservices on kubernetes as a pros (ht...Dev fest 2020 taiwan   how to debug microservices on kubernetes as a pros (ht...
Dev fest 2020 taiwan how to debug microservices on kubernetes as a pros (ht...KAI CHU CHUNG
 
Google App Engine: Basic
Google App Engine: BasicGoogle App Engine: Basic
Google App Engine: BasicKAI CHU CHUNG
 
COSCUP 2020 Google 技術 x 公共參與 x 開源 口罩地圖技術開源
COSCUP 2020 Google 技術 x 公共參與 x 開源 口罩地圖技術開源COSCUP 2020 Google 技術 x 公共參與 x 開源 口罩地圖技術開源
COSCUP 2020 Google 技術 x 公共參與 x 開源 口罩地圖技術開源KAI CHU CHUNG
 
GDG Cloud Taipei meetup #50 - Build go kit microservices at kubernetes with ...
GDG Cloud Taipei meetup #50 - Build go kit microservices at kubernetes  with ...GDG Cloud Taipei meetup #50 - Build go kit microservices at kubernetes  with ...
GDG Cloud Taipei meetup #50 - Build go kit microservices at kubernetes with ...KAI CHU CHUNG
 
GDG Devfest 2019 - Build go kit microservices at kubernetes with ease
GDG Devfest 2019 - Build go kit microservices at kubernetes with easeGDG Devfest 2019 - Build go kit microservices at kubernetes with ease
GDG Devfest 2019 - Build go kit microservices at kubernetes with easeKAI CHU CHUNG
 
Global GDG Leaders Summit, Google I/O 2018 經驗分享
Global GDG Leaders Summit, Google I/O 2018 經驗分享Global GDG Leaders Summit, Google I/O 2018 經驗分享
Global GDG Leaders Summit, Google I/O 2018 經驗分享KAI CHU CHUNG
 

More from KAI CHU CHUNG (15)

Devfest 2023 - Service Weaver Introduction - Taipei.pdf
Devfest 2023 - Service Weaver Introduction - Taipei.pdfDevfest 2023 - Service Weaver Introduction - Taipei.pdf
Devfest 2023 - Service Weaver Introduction - Taipei.pdf
 
DevFest 2022 - Skaffold 2 Deep Dive Taipei.pdf
DevFest 2022 - Skaffold 2 Deep Dive Taipei.pdfDevFest 2022 - Skaffold 2 Deep Dive Taipei.pdf
DevFest 2022 - Skaffold 2 Deep Dive Taipei.pdf
 
DevFest 2022 - Cloud Workstation Introduction TaiChung
DevFest 2022 - Cloud Workstation Introduction TaiChungDevFest 2022 - Cloud Workstation Introduction TaiChung
DevFest 2022 - Cloud Workstation Introduction TaiChung
 
Devfest 2021' - Artifact Registry Introduction (Taipei)
Devfest 2021' - Artifact Registry Introduction (Taipei)Devfest 2021' - Artifact Registry Introduction (Taipei)
Devfest 2021' - Artifact Registry Introduction (Taipei)
 
Coscup x ruby conf tw 2021 google cloud buildpacks 剖析與實踐
Coscup x ruby conf tw 2021  google cloud buildpacks 剖析與實踐Coscup x ruby conf tw 2021  google cloud buildpacks 剖析與實踐
Coscup x ruby conf tw 2021 google cloud buildpacks 剖析與實踐
 
Velero search & practice 20210609
Velero search & practice 20210609Velero search & practice 20210609
Velero search & practice 20210609
 
Gdg cloud taipei ddt meetup #53 buildpack
Gdg cloud taipei ddt meetup #53 buildpackGdg cloud taipei ddt meetup #53 buildpack
Gdg cloud taipei ddt meetup #53 buildpack
 
GDG Cloud Taipei: Meetup #52 - Istio Security: API Authorization
GDG Cloud Taipei: Meetup #52 - Istio Security: API AuthorizationGDG Cloud Taipei: Meetup #52 - Istio Security: API Authorization
GDG Cloud Taipei: Meetup #52 - Istio Security: API Authorization
 
如何透過 Go-kit 快速搭建微服務架構應用程式實戰
如何透過 Go-kit 快速搭建微服務架構應用程式實戰如何透過 Go-kit 快速搭建微服務架構應用程式實戰
如何透過 Go-kit 快速搭建微服務架構應用程式實戰
 
Dev fest 2020 taiwan how to debug microservices on kubernetes as a pros (ht...
Dev fest 2020 taiwan   how to debug microservices on kubernetes as a pros (ht...Dev fest 2020 taiwan   how to debug microservices on kubernetes as a pros (ht...
Dev fest 2020 taiwan how to debug microservices on kubernetes as a pros (ht...
 
Google App Engine: Basic
Google App Engine: BasicGoogle App Engine: Basic
Google App Engine: Basic
 
COSCUP 2020 Google 技術 x 公共參與 x 開源 口罩地圖技術開源
COSCUP 2020 Google 技術 x 公共參與 x 開源 口罩地圖技術開源COSCUP 2020 Google 技術 x 公共參與 x 開源 口罩地圖技術開源
COSCUP 2020 Google 技術 x 公共參與 x 開源 口罩地圖技術開源
 
GDG Cloud Taipei meetup #50 - Build go kit microservices at kubernetes with ...
GDG Cloud Taipei meetup #50 - Build go kit microservices at kubernetes  with ...GDG Cloud Taipei meetup #50 - Build go kit microservices at kubernetes  with ...
GDG Cloud Taipei meetup #50 - Build go kit microservices at kubernetes with ...
 
GDG Devfest 2019 - Build go kit microservices at kubernetes with ease
GDG Devfest 2019 - Build go kit microservices at kubernetes with easeGDG Devfest 2019 - Build go kit microservices at kubernetes with ease
GDG Devfest 2019 - Build go kit microservices at kubernetes with ease
 
Global GDG Leaders Summit, Google I/O 2018 經驗分享
Global GDG Leaders Summit, Google I/O 2018 經驗分享Global GDG Leaders Summit, Google I/O 2018 經驗分享
Global GDG Leaders Summit, Google I/O 2018 經驗分享
 

Recently uploaded

Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 

Recently uploaded (20)

Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 

Google apps script introduction

  • 2. HELLO! I am Cage Chung I am here because I like to share my experiences. You can find me at https://kaichu.io / QNAP 雲端應用部資深工程師
  • 3. https://www.facebook.com/groups/GCPUG.TW/ https://plus.google.com/u/0/communities/116100913832589966421 [您知道”GCPUG”要怎麼唸嗎?為什麼會有一隻狗在 Logo裡面呢?] Google Cloud Platform User Group的縮寫是GCPUG GCPUG直接唸成G.C.P.U.G?當然可以! 但它也可以分開來,唸成 G.C. PUG喔~ Pug,指的是巴哥犬,所以 GCPUG的Logo中間才會有一隻可愛的巴哥犬喲。 下次聽到別人說G.C. PUG 的時候,您就可以大聲 說:「我也是G.C. PUG社團成員!」
  • 4. Outline ◉ What’s Google Apps Script? ◉ Study Cases ◉ CoffeMap ◉ i18n Helper ◉ Trips & Tips ◉ Study information
  • 5. What’s Google App Scripts Let’s start with the first set of slides 1
  • 6. “Google Apps Script is a scripting language based on JavaScript that lets you do new and cool things with Google Apps
  • 7. One platform in the cloud Sheet Docs Slide Forms Sites Drive Gmail Calendar Contacts Groups Maps Translate
  • 8. Add-ons for Google Apps Sheet Docs Forms
  • 12. Add-ons for Google Apps - continue
  • 13. G Suite Service ◉ Calendar ◉ Contacts ◉ Document ◉ Drive ◉ Forms ◉ Gmail ◉ Groups ◉ Language ◉ Maps ◉ Site ◉ Slides ◉ Spreadsheet
  • 14. Advanced Google Service ◉ Admin SDK ◉ AdSence ◉ Analytics ◉ Apps Activity ◉ BigQuery ◉ Calendar ◉ Classroom ◉ Drive ◉ DoubleClick Campaigns ◉ Fusion Tables ◉ Gmail ◉ Google+ ◉ Mirror ◉ Prediction ◉ Sheets ◉ Shopping Content ◉ Slides ◉ Tasks ◉ Tag Manager ◉ URL Shortener ◉ Youtube
  • 15. Script Services ◉ Base ◉ Cache ◉ Card ◉ Charts ◉ Content ◉ HTML ◉ JDBC ◉ Lock ◉ Mail ◉ Optimization ◉ Properties ◉ Script ◉ URL Fetch ◉ Utilities ◉ XML
  • 16. Type of Scripts - Standalone // Log the name of every file in the user's Drive that modified after February 28, // 2013 whose name contains "untitled". function doAction(){ var files = DriveApp.searchFiles( 'modifiedDate > "2015-01-01" and title contains "untitled"'); while (files.hasNext()) { var file = files.next(); Logger.log(file.getName()); } } Standalone is any script that is not bound to a Google Sheets, Docs, Slides or Forms file or Google Sites. [iOS Taipei - Apps Script - Type of Scripts - Standalone](https://goo.gl/oj8WVO)
  • 17. Type of Scripts - Bound to G Suite Documents function doAction(range) { // Get the active spreadsheet and the active sheet var ss = SpreadsheetApp.getActiveSpreadsheet(); var sheet = ss.getActiveSheet(); // Get the range of cells that store employee data. var libraryDataRange = sheet.getRange(range); var libraryObjects = getRowsData(sheet, libraryDataRange, 1); libraryObjects.forEach(function (row, index) { var latlng = getLatitudeLongitude(row.address) if (latlng) { sheet.getRange(index + 2, 5, 1, 1).setValue(latlng.lat); sheet.getRange(index + 2, 6, 1, 1).setValue(latlng.lng); } }); } Bound to Google Apps A script is bound to a Google Sheets, Docs, or Forms file.
  • 18. Type of Scripts - Bound to G Suite Documents. continue Trigger and Events Triggers let Apps Script run a function automatically when a certain event, like opening a document, occurs. [coffeemap-testing-form - Google Sheets](https://goo.gl/ZAIOtT) [coffeemap](https://goo.gl/Wb91tW) quick setup form
  • 19. Type of Scripts - Web Apps and Site Gadgets Web Apps and Site Gadgets If you build a user interface for a script, you can publish the script as a web app ◉ It contains a doGet(e) and doPost(e) function. ◉ The function returns an HTML service HtmlOutput object or a Content service TextOutput object.
  • 20. Type of Scripts - Web Apps and Site Gadgets. continue function doGet() { var ss = SpreadsheetApp.openById('1QgsaX4Vn_lIwLFRC_iHs6gmJYIP4y-35nVqQOpz4B0s'); var sheet = ss.getSheets()[0]; // Get the range of cells that store employee data. var employeeDataRange = ss.getRangeByName("employeeData"); // For every row of employee data, generate an employee object. var employeeObjects = getRowsData(sheet, employeeDataRange); return ContentService.createTextOutput(JSON.stringify(employeeObjects)).setMimeType(ContentService.MimeType.JSON); } $ curl -L https://script.google.com/macros/s/AKfycbz4Z2dm-MUidB98H5XbekL0LZnvPVRM3ekpG-NSrScc9tvI87A/exec [{"level":1,"id":"A00","parent":"root","type":"D","title":"資訊研發 處","email":"A00@aa.bb.cc"},{"level":2,"id":"A10","parent":"A00","type":"D","title":"資訊研發 部","email":"A10@aa.bb.cc"},{"level":3,"id":"SunnyHu","parent":"A10","type":"U","title":"胡適 ...
  • 21. Study Cases Let’s start with the second set of slides 2
  • 22. Coffee map function getLatitudeLongitude(address) { var geocode = Maps.newGeocoder().geocode(address); if (geocode.results.length) return geocode.results[0].geometry.location; else return null; }
  • 23. i18n helper function exportJson(data) { google.script.run.withSuccessHandler(handleDownload) .withFailureHandler(showError).exportJobs(data); } function handleDownload(data) { var blob = new Blob([new Uint8Array(data.content)], { type: "octet/stream" }); var link = document.createElement('a'); link.download = data.fileName; link.href = window.URL.createObjectURL(blob); link.click(); $('#export').text('Export') }
  • 24. i18n helper. continue function exportJobs(data) { var blobs = []; ... data.columns.forEach(function (column) { blobs.push(getBlob(ss, data.sheet, column.name, parseInt(column.index, 10) + 1)); }) var now = new Date(); var datetime = Utilities.formatDate(now, 'Asia/Taipei', 'yyyyMMddHHmm'); var fileName = ass.getName() + "_" + ss.getName() + "_i18n_" + datetime + ".zip"; var zip = Utilities.zip(blobs, fileName); return { fileName: fileName, content: zip.getBytes(), } } function getBlob(ss, sheetName, columnName, columnIndex) { content = getContent(ss, columnName, columnIndex) return Utilities.newBlob(content, "text/javascript", columnName + ".js") }
  • 26. Trips & Tips Let’s start with the third set of slides 3
  • 27. “gapps (Google Apps Script) The easiest way to develop Google Apps Script projects
  • 28. $ gapps init 1k6eNig3veKXV_7_vQFcyQZDrDmB_qrJc5dlFRaQwDaM5ATaIMmclB-oP $ gapps auth client_secret_566039949734-6b7kpll6rd4vil7896depbtt8t7fpc09.apps.googleusercontent.com.json $ gapps push gapps
  • 29. STUDY INFORMATION Let’s start with the fourth set of slides 4
  • 30. Study info ◉ [Google apps script - simon su](http://www.slideshare.net/peihsinsu/google-apps-script-24469585) ◉ [entaq/GoogleAppsScript](https://github.com/entaq/GoogleAppsScript) ◉ [Script It! with Android - YouTube](https://www.youtube.com/watch?v=RSgMEtRl0sw&list=PL68F511F6 E3C122EB) ◉ [Apps Script Crash Course: ContentService YouTube](https://www.youtube.com/watch?v=JRGzVdliQOQ&list=PL68F511F6 E3C122EB) ◉ [Apps Script | Google Developers](https://developers.google.com/apps-script/) [Google Apps Script 入門與應用 - 資訊學科中 心](http://icerc.tnssh.tn.edu.tw/download/rs/1030429_3.pdf)
  • 31. Study information - examples ◉ [Generate EPUB file with Google Apps Scripts | blog.softapalvelin.com](http://blog.softapalvelin.com/2013/02/generate-epub-file-wi th-google-app.html) ◉ [RSSToEPUB](https://goo.gl/YCDDBo) [google/google-apps-script-samples](https://github.com/google/google-apps-script-s amples) ◉ [Tutorials | Apps Script | Google Developers](https://developers.google.com/apps-script/articles) ◉ [Parsing HTML - Google Apps Script Examples](https://sites.google.com/site/scriptsexamples/learn-by-example/parsing- html)
  • 32. Study information - Tools ◉ [danthareja/node-google-apps-script: The easiest way to develop Google Apps Script projects](https://github.com/danthareja/node-google-apps-script)
  • 33. THANKS! Any questions? You can find me at https://kaichu.io / cage.chung@gmail.com