Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Free study Google Apps Script
Search
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
960
AMPをかじってみた話 / The first impression of AMP
ms76
1
1.4k
とあるサービスの運営を追体験してみよう / Let's experience a certain services vicariously
ms76
1
970
1秒間に250通のメールをさばくAWSの使い方
ms76
2
2.1k
Other Decks in Technology
See All in Technology
Cognition AI Japan - ウェビナー2_テストQA_運用監視
cogakira
0
130
予測不能な実行エージェントを安全にサクッと試せるサンドボックス環境の話
sansantech
PRO
1
140
分析AIエージェントを育てる、動く環境を育てる
codatum
1
760
FactoryBotアンチパターン / factory_bot anti-patterns
toshimaru
0
150
MCPゲートウェイを作って運用してわかったこと — Agent時代の権限管理の現在地
mtpooh
10
3.3k
メルペイ 会計システム概要と歴史
mewuto
0
200
AI 時代の Azure エンジニアリング ~ 私たちは何を磨き、何を任せるのか ~
chack411
1
580
自分で立ててみるLLMサービス
y_sera15
0
160
AIは爆速なのに、私が詰まっていた話 ― 音声入力と鳴くマスコットでボトルネックを削る
yama3133
0
590
UniFi(ユニファイ)AIカメラの現場活用
ludicmind
1
410
AI駆動開発、viviONの1年 ── うまくいったこと・いかなかったこと
vivion
0
290
SREでアラート疲れを 解決しよう!
kairim0
1
220
Featured
See All Featured
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.4k
Documentation Writing (for coders)
carmenintech
77
5.6k
The untapped power of vector embeddings
frankvandijk
2
1.9k
Ruling the World: When Life Gets Gamed
codingconduct
0
400
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
770
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.4k
WCS-LA-2024
lcolladotor
0
870
Statistics for Hackers
jakevdp
799
230k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
390
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.7k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.6k
Writing Fast Ruby
sferik
630
63k
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ͷಉظࣗಈͰͰ͖Δɻ
Ҏ্Ͱ͢