Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Free study Google Apps Script
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Masashi Sekine
August 25, 2017
Technology
1.1k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Free study Google Apps Script
Masashi Sekine
August 25, 2017
More Decks by Masashi Sekine
See All by Masashi Sekine
Introduction to HTTP2
ms76
0
940
AMPをかじってみた話 / The first impression of AMP
ms76
1
1.4k
とあるサービスの運営を追体験してみよう / Let's experience a certain services vicariously
ms76
1
960
1秒間に250通のメールをさばくAWSの使い方
ms76
2
2.1k
Other Decks in Technology
See All in Technology
Software Supply Chain Attackからクラウド環境を守るためにできること
lhazy
2
230
Agent 時代の Kaggle 展望 / kaggle-in-the-agentic-era
upura
1
690
Digitization部 紹介資料
sansan33
PRO
2
7.7k
クラウドセキュリティ入門 ~安全なクラウド利用のための基礎知識~
lhazy
12
8.5k
Eight Engineering Unit 紹介資料
sansan33
PRO
3
8.1k
ボトムアップ文化が強い組織で セキュリティをどう根付かせていくかの現在進行形の話 / Making Security Stick in a Bottom-Up Organization
yamaguchitk333
0
210
AWS ネットワーク構築でハマった(ハマりかけた) 5選とそこから得た教訓
nagisa53
4
200
侵入は突然に 〜 IoTマルウェアと悪用される家庭の機器 ~ / When Intrusion Strikes: IoT Malware and the Abuse of Home Devices
nttcom
0
1.6k
【CEDEC2026】グラフィックスエンジニアのためのニューラルシェーディング入門
cygames
PRO
0
130
モダンフロントエンド 開発研修
recruitengineers
PRO
4
580
Invisible to AI? Making TYPO3 Sites Quotable by AI Search Systems
wolfgangwagner
0
180
え?フロントエンドエンジニアの ワイがインフラも!?
puku0x
1
480
Featured
See All Featured
How to Ace a Technical Interview
jacobian
281
24k
So, you think you're a good person
axbom
PRO
2
2.1k
Fireside Chat
paigeccino
42
4k
Abbi's Birthday
coloredviolet
3
9.3k
Odyssey Design
rkendrick25
PRO
2
750
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
350
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.6k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
170
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
380
The SEO identity crisis: Don't let AI make you average
varn
0
530
Transcript
Նͷࣗ༝ݚڀ Google Apps Script @ms76 Tokyo Otaku Modeࣾษڧձ (2017/08/25)
Google Apps Script 1. Ͳ͏͍͏ݴޠʁ 2. ͲΜͳ͜ͱ͕Ͱ͖Δʁʢؾʹͳͬͨػೳʣ 3. Tips
1. Ͳ͏͍͏ݴޠʁ
Ͳ͏͍͏ݴޠʁ ”Google Apps Script is a scripting language for light-weight
application development in the Google Apps platform. It is based on JavaScript 1.6 with some portions of 1.7 and 1.8 and provides subset of ECMAScript 5 API “ https://en.wikipedia.org/wiki/Google_Apps_Script
2. Կ͕Ͱ͖Δʁ (ؾʹͳͬͨػೳ)
Կ͕Ͱ͖Δʁ • Google AppsͷΧελϚΠζ • Google AppsͱଞαʔϏεͱͷ࿈ܞ
Կ͕Ͱ͖Δʁ άϩʔόϧείʔϓʹͲΜͳΫϥε͕͋Δ͔ʁ
άϩʔόϧείʔϓ • CalendarApp • ContactsApp • DocumentApp • DriveApp •
FormApp • GmailApp • GroupsApp • LanguageApp • MailApp • ScriptApp • SitesApp • SpreadsheetApp • UiApp • UrlFetchApp • CacheService • ContentService • ErrorService • HomeroomService • HtmlService • LinearOptimization Service • LockService • PropertiesService • SoapService • XmlService • Browser • Charts • Jdbc • Logger • Maps • MimeType • ScriptProperties • Session • UserProperties • Utilities • Xml • console ؒͣΕͬΆ͍ Appܥ Serviceܥ ͦͷଞ
UIApp ৮ΕͪΌ͍͚ͳ͍ࢠͩͬͨ
UrlFetchApp https://developers.google.com/apps-script/reference/url-fetch/url-fetch-app
UrlFetchApp https://developers.google.com/apps-script/reference/url-fetch/url-fetch-app httpͰ֎෦Ϧιʔεͱ௨৴͕Ͱ͖ΔΫϥεɻ ֎෦αʔϏε࿈ܞʹ͔ܽͤͳ͍ɻ fetchͱ͍͏໊લ͚ͩͲ POSTͰ͖Δɻ
άϩʔόϧείʔϓ • CalendarApp • ContactsApp • DocumentApp • DriveApp •
FormApp • GmailApp • GroupsApp • LanguageApp • MailApp • ScriptApp • SitesApp • SpreadsheetApp • UiApp • UrlFetchApp • CacheService • ContentService • ErrorService • HomeroomService • HtmlService • LinearOptimization Service • LockService • PropertiesService • SoapService • XmlService • Browser • Charts • Jdbc • Logger • Maps • MimeType • ScriptProperties • Session • UserProperties • Utilities • Xml • console Appܥ Serviceܥ ͦͷଞ ͜Μͳͷ͋ΔΜͩܥ
CacheService https://developers.google.com/apps-script/reference/cache/cache
CacheService https://developers.google.com/apps-script/reference/cache/cache Cacheʹখ͞ͳσʔλΛอଘ͢Δ͜ͱ͕Ͱ͖ Δɻ TTLΛઃఆ͢ΕࣗಈͰexpireͯ͘͠ΕΔɻ ScopeΛ͖ͪΜͱཧղ͢ΕෳࡶͳΞϓϦέʔ γϣϯͭ͘Εͦ͏ɻ
ContentService https://developers.google.com/apps-script/guides/content
ContentService https://developers.google.com/apps-script/guides/content ScriptΛWebΞϓϦέʔγϣϯͱͯ͠ެ։ͨ͠ ࣌ʹར༻ɻ HTMLҎ֎ͷͷMIME TYPEΛࢦఆͯ͠ฦ͢ ͜ͱ͕Ͱ͖Δɻ
LockService https://developers.google.com/apps-script/reference/lock/lock-service
LockService https://developers.google.com/apps-script/reference/lock/lock-service 3ͭͷείʔϓʢdocument͝ͱ / user͝ͱ / script͝ͱ ʣʹରͯ͠1ͭͷϩοΫΛ͔͚Δ͜ͱ ͕Ͱ͖Δɻ ಉ࣌ʹ৮ΒΕΔͱࠔΔέʔεͰར༻Ͱ͖Δɻ
Jdbc https://developers.google.com/apps-script/guides/jdbc
Jdbc https://developers.google.com/apps-script/guides/jdbc JDBCΛαϙʔτͨ͠֎෦ͷσʔλϕʔεʹΞΫ ηεͰ͖Δɻ Πϯλʔωοτӽ͠ʹͳΔͷͰެ։͞Ε͍ͯΔ ΞΫηεݩͷIPͷΈڐՄ͢ΔΑ͏ʹઃఆ͢Δ͜ ͱ͕ඞཁɻ
άϩʔόϧείʔϓ • CalendarApp • ContactsApp • DocumentApp • DriveApp •
FormApp • GmailApp • GroupsApp • LanguageApp • MailApp • ScriptApp • SitesApp • SpreadsheetApp • UiApp • UrlFetchApp • CacheService • ContentService • ErrorService • HomeroomService • HtmlService • LinearOptimization Service • LockService • PropertiesService • SoapService • XmlService • Browser • Charts • Jdbc • Logger • Maps • MimeType • ScriptProperties • Session • UserProperties • Utilities • Xml • console Appܥ Serviceܥ ͦͷଞ ศརܥ
Utilities https://developers.google.com/apps-script/reference/utilities/utilities
Utilities https://developers.google.com/apps-script/reference/utilities/utilities ศརܥϝιου͕·ͱ·͍ͬͯΔɻ base64Τϯίʔυ/σίʔυɺHashͷܭࢉɺ UUIDͷੜɺCSVͷύʔεɺzip/unzipͳͲɻ
PropertiesService https://developers.google.com/apps-script/guides/properties
PropertiesService https://developers.google.com/apps-script/guides/properties ڥมͷΑ͏ʹϓϩδΣΫτʹΛอଘ͢Δ͜ͱ͕Ͱ͖Δɻ
3. Tips
Tips ᶃ खܰͳdebugLogger.log()Ͱɻ
Tips ᶄ ࣮clonsole͕͑Δɻʢlog, time, error ͳͲʣ ϩάGCPͷStackdriver logingͱ͍͏ίϯιʔϧʹͰ·͢ɻ
Tips ᶅ functionͷ࠷ޙʹΞϯμʔείΞΛ͚Δͱprivate functionʹͳΔɻ
Tips ᶆ Google AppsͷυΩϡϝϯτʹඥ͍ͨScriptͱͦ͏͡Όͳ͍Script͕͋Δʢ࠷ ॳށ͏ʣɻτϦΨʔʹҧ͍͋Γɻ
Tips extra • ϥΠϒϥϦػೳΛ͑ϥΠϒϥϦԽͨ͠ momentlodash͑Δɻ • browserify + babelify +
gasify Λ͑exportΛ ͬͨΓES2015ͷߏจͰॻ͚Δʢग़དྷ্͕ͬͨ ιʔε…ʣ • ͦͯ͠ node-google-apps-script Λ͑։ൃ ڥͱGoogle DriveͷಉظࣗಈͰͰ͖Δɻ
Ҏ্Ͱ͢