SlideShare uma empresa Scribd logo
1 de 33
Baixar para ler offline
Quick Start To GAS
Gakuji Tamaki
Systems Developer
APCommunications Co., Ltd.
Twitter: @gkzvoice, Github/Medium: @gkzz
Source; sinap.jp
Table of Contents
1.About Me
2.Today’s Goal
3.Overview of Google Apps Script
4.Get Data From SpreadSheet
5.Post Data To Chat App
6.Appendix
1.About Me
Source;
Python Logo: www.python.org, CentOS’s: www.centos.org, StackStorm’s: stackstorm.com,
2.Today’s Goal
See A Demo
Source;
Demo: @gkzvoice
Code: github.com/gkzz/gas-handson
Source; giphy.com
What’s Going On!?
Source; www.azquotes.com
Does A Function Really Do just One Thing?
Function 1
postData()
Function 3
postOnly()
Function 2
getData()
Function 1
setUp()
Function 1
postData()
My Opinion:
If you feel naming is difficult,
split your functions/variables
into the smaller ones.
Table of Contents (Re:)
1.About Me
2.Today’s Goal
3.Overview of Google Apps Script
4.Get Data From SpreadSheet
5.Post Data To Chat App
6.Appendix
3.Overview of Google Apps Script
- Cloud-based Application Development Platform
- Based on JavaScript
- Integrate Easily with Google/Third-Party Apps
- Also Allows Scripts to Return HTML
Source;
Image: www.lucidchart.com
Cf. My Sample Script’s URL
Today’s BOT Workflow:
- setUp
- getData
- Boolean
(Any News?)
True
False
- send
“NoNews”
- postNews
Source;
SpreadSheet: www.iconarchive.com,
Slack: www.iosicongallery.com, Gmail: www.flaticon.com
Table of Contents (Re:)
1.About Me
2.Today’s Goal
3.Overview of Google Apps Script
4.Get Data From
SpreadSheet
5.Post Data To Chat App
6.Appendix
Function 3
postOnly()
Function 2
getData()
Function 1
setUp()
4.Get Data From SpreadSheet
See A Demo
Source;
Demo: @gkzvoice
Code: github.com/gkzz/gas-handson
Table of Contents (Re:)
1.About Me
2.Today’s Goal
3.Overview of Google Apps Script
4.Get Data From
SpreadSheet
5.Post Data To Chat App
6.Appendix
Function 3
postOnly()
Function 2
getData()
Function 1
setUp()
5.Post Data To Chat App
See A Demo
Source;
Demo: @gkzvoice
Code: github.com/gkzz/gas-handson
Source; sinap.jp
6.Appendix
1.Run Apps Script
2.Use Debugger
3.Add Libraries
4.Get Incoming Webhook URL
5.Add BOT User
6.Change Permissions
7.Get userID through Tester
8. Deploy as Web App, Enable Events
9. All Sample Codes
-mailDraft, getUserList, getChannelHistory, etc
6-1.Appendix Run Apps Script
3.Push “View” and “Logs” Button,
See the Logged Output
1.Predict Value of Variable
2.Set Logger.log(“val: %s”, val),
Run Script
Develop
& Debug
6-2.Appendix
Use Debugger
[19-03-30 21:36:23:487 JST] writeConts: 0.0
[19-03-30 21:36:23:488 JST] Successful!
[19-03-30 21:36:23:489 JST] i: 0.0
[19-03-30 21:36:23:489 JST] value: [Thu Mar 28 13:02:45 GMT+09:00
2019, gendo@example.com, Gendo, NERV, Shinji, Eva1, Mankind’s
greatest fear is Mankind itself., , , , , , , , , , Done]
[19-03-30 21:36:23:490 JST] writeConts: 1.0
[19-03-30 21:36:23:490 JST] Successful!
[19-03-30 21:36:23:491 JST] i: 1.0
[19-03-30 21:36:23:492 JST] value: [Fri Mar 29 13:02:45 GMT+09:00 2019,
gendo@example.com, Gendo, NERV, Shinji, Eva1, Mankind’s greatest fear
is Mankind itself., , , , , , , , , , Done]
[19-03-30 21:36:23:492 JST] writeConts: 2.0
[19-03-30 21:24:55:236 JST] valueRange.length: 8.0
[19-03-30 21:24:55:238 JST] Successful!
[19-03-30 21:24:55:239 JST] i: 0.0
[19-03-30 21:24:55:240 JST] value: [Thu Mar 28 13:02:45 GMT+09:00
2019, gendo@example.com, Gendo, NERV, Shinji, Eva1, Mankind’s
greatest fear is Mankind itself., , , , , , , , , , Done]
Source;
1st Code: devel-old/sendRichMsg.js, 2nd:
topic-getValueRange/sendRichMsg.js
6-3.Appendix Add Libraries
See A Demo
Source;
Demo: @gkzvoice
Code: https://github.com/gkzz/gas-handson
Moment.js library key;
MHMchiX6c1bwSqGM1PZiW_PxhMjh3Sh48
6-4.Appendix Get Incoming Webhook URL
https://api.slack.com/apps
6-5.Appendix Add BOT User
6-6.Appendix Change Permissions
6-7.Appendix Get userID through Tester
https://api.slack.com/methods/users.list/test
<Your WorkSpace Name>
xoxb-aaaaaaaaaa
6-8. Deploy as Web App,
Enable Events --Work in Progress---
6-9. All Sample Codes
Go to the Following Github Page
https://github.com/gkzz/gas-handson
Fin.Twitter: @gkzvoice, Github/Medium: @gkzz

Mais conteúdo relacionado

Semelhante a QuickStartToGAS

Openstack contribution process
Openstack contribution processOpenstack contribution process
Openstack contribution process
Syed Armani
 
OpenStack Contribution Process
OpenStack Contribution ProcessOpenStack Contribution Process
OpenStack Contribution Process
openstackindia
 

Semelhante a QuickStartToGAS (20)

Shipping to Learn and Accelerate Growth with GitHub
Shipping to Learn and Accelerate Growth with GitHubShipping to Learn and Accelerate Growth with GitHub
Shipping to Learn and Accelerate Growth with GitHub
 
Openstack contribution process
Openstack contribution processOpenstack contribution process
Openstack contribution process
 
OpenStack Contribution Process
OpenStack Contribution ProcessOpenStack Contribution Process
OpenStack Contribution Process
 
Real_World_0days.pdf
Real_World_0days.pdfReal_World_0days.pdf
Real_World_0days.pdf
 
Dynamics 365 self hosting bots
Dynamics 365 self hosting botsDynamics 365 self hosting bots
Dynamics 365 self hosting bots
 
Harnessing the cloud to create social mobile apps that scale
Harnessing the cloud to create social mobile apps that scaleHarnessing the cloud to create social mobile apps that scale
Harnessing the cloud to create social mobile apps that scale
 
[T3 ext day] all in one chat – real time chat
[T3 ext day] all in one chat – real time chat[T3 ext day] all in one chat – real time chat
[T3 ext day] all in one chat – real time chat
 
Budapest Spark Meetup - Apache Spark @enbrite.ly
Budapest Spark Meetup - Apache Spark @enbrite.lyBudapest Spark Meetup - Apache Spark @enbrite.ly
Budapest Spark Meetup - Apache Spark @enbrite.ly
 
Going open source with small teams
Going open source with small teamsGoing open source with small teams
Going open source with small teams
 
Git ongithub
Git ongithubGit ongithub
Git ongithub
 
Bitrise: Make iOS Builds Faster - Tokyo 2019 March - Cookpad meetup
Bitrise: Make iOS Builds Faster - Tokyo 2019 March - Cookpad meetupBitrise: Make iOS Builds Faster - Tokyo 2019 March - Cookpad meetup
Bitrise: Make iOS Builds Faster - Tokyo 2019 March - Cookpad meetup
 
GigaSpaces Cloud Computing Framework 4 XAP - Quick Tour - v2
GigaSpaces Cloud Computing Framework 4 XAP - Quick Tour - v2GigaSpaces Cloud Computing Framework 4 XAP - Quick Tour - v2
GigaSpaces Cloud Computing Framework 4 XAP - Quick Tour - v2
 
Big query - Command line tools and Tips - (MOSG)
Big query - Command line tools and Tips - (MOSG)Big query - Command line tools and Tips - (MOSG)
Big query - Command line tools and Tips - (MOSG)
 
Gutmacher javascript-bookmarklets-sosuv-july2020
Gutmacher javascript-bookmarklets-sosuv-july2020Gutmacher javascript-bookmarklets-sosuv-july2020
Gutmacher javascript-bookmarklets-sosuv-july2020
 
Bronx study jam 2
Bronx study jam 2Bronx study jam 2
Bronx study jam 2
 
Hyperkitty: Updating Mailman's UI
Hyperkitty: Updating Mailman's UIHyperkitty: Updating Mailman's UI
Hyperkitty: Updating Mailman's UI
 
Getting Started in Custom Programming for Talent Sourcing
Getting Started in Custom Programming for Talent SourcingGetting Started in Custom Programming for Talent Sourcing
Getting Started in Custom Programming for Talent Sourcing
 
CrashCourse: Python with DataCamp and Jupyter for Beginners
CrashCourse: Python with DataCamp and Jupyter for BeginnersCrashCourse: Python with DataCamp and Jupyter for Beginners
CrashCourse: Python with DataCamp and Jupyter for Beginners
 
Hacking the Kinect with GAFFTA Day 1
Hacking the Kinect with GAFFTA Day 1Hacking the Kinect with GAFFTA Day 1
Hacking the Kinect with GAFFTA Day 1
 
Lessons Learned from Migrating Legacy Enterprise Applications to Microservices
Lessons Learned from Migrating Legacy Enterprise Applications to MicroservicesLessons Learned from Migrating Legacy Enterprise Applications to Microservices
Lessons Learned from Migrating Legacy Enterprise Applications to Microservices
 

Último

Breaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfBreaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
UK Journal
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
FIDO Alliance
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
UXDXConf
 

Último (20)

The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - Questionnaire
 
ERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage Intacct
 
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
 
TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024
 
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfBreaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
 
ADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptxADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptx
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentation
 
WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджера
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
 
Using IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandUsing IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & Ireland
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 Warsaw
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
 
Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024
 

QuickStartToGAS

  • 1. Quick Start To GAS Gakuji Tamaki Systems Developer APCommunications Co., Ltd. Twitter: @gkzvoice, Github/Medium: @gkzz
  • 3. Table of Contents 1.About Me 2.Today’s Goal 3.Overview of Google Apps Script 4.Get Data From SpreadSheet 5.Post Data To Chat App 6.Appendix
  • 4. 1.About Me Source; Python Logo: www.python.org, CentOS’s: www.centos.org, StackStorm’s: stackstorm.com,
  • 5. 2.Today’s Goal See A Demo Source; Demo: @gkzvoice Code: github.com/gkzz/gas-handson
  • 8. Does A Function Really Do just One Thing? Function 1 postData()
  • 9. Function 3 postOnly() Function 2 getData() Function 1 setUp() Function 1 postData()
  • 10. My Opinion: If you feel naming is difficult, split your functions/variables into the smaller ones.
  • 11. Table of Contents (Re:) 1.About Me 2.Today’s Goal 3.Overview of Google Apps Script 4.Get Data From SpreadSheet 5.Post Data To Chat App 6.Appendix
  • 12. 3.Overview of Google Apps Script - Cloud-based Application Development Platform - Based on JavaScript - Integrate Easily with Google/Third-Party Apps - Also Allows Scripts to Return HTML Source; Image: www.lucidchart.com Cf. My Sample Script’s URL
  • 13. Today’s BOT Workflow: - setUp - getData - Boolean (Any News?) True False - send “NoNews” - postNews Source; SpreadSheet: www.iconarchive.com, Slack: www.iosicongallery.com, Gmail: www.flaticon.com
  • 14. Table of Contents (Re:) 1.About Me 2.Today’s Goal 3.Overview of Google Apps Script 4.Get Data From SpreadSheet 5.Post Data To Chat App 6.Appendix Function 3 postOnly() Function 2 getData() Function 1 setUp()
  • 15. 4.Get Data From SpreadSheet See A Demo Source; Demo: @gkzvoice Code: github.com/gkzz/gas-handson
  • 16. Table of Contents (Re:) 1.About Me 2.Today’s Goal 3.Overview of Google Apps Script 4.Get Data From SpreadSheet 5.Post Data To Chat App 6.Appendix Function 3 postOnly() Function 2 getData() Function 1 setUp()
  • 17. 5.Post Data To Chat App See A Demo Source; Demo: @gkzvoice Code: github.com/gkzz/gas-handson
  • 18. Source; sinap.jp 6.Appendix 1.Run Apps Script 2.Use Debugger 3.Add Libraries 4.Get Incoming Webhook URL 5.Add BOT User 6.Change Permissions 7.Get userID through Tester 8. Deploy as Web App, Enable Events 9. All Sample Codes -mailDraft, getUserList, getChannelHistory, etc
  • 20.
  • 21. 3.Push “View” and “Logs” Button, See the Logged Output 1.Predict Value of Variable 2.Set Logger.log(“val: %s”, val), Run Script Develop & Debug 6-2.Appendix Use Debugger
  • 22. [19-03-30 21:36:23:487 JST] writeConts: 0.0 [19-03-30 21:36:23:488 JST] Successful! [19-03-30 21:36:23:489 JST] i: 0.0 [19-03-30 21:36:23:489 JST] value: [Thu Mar 28 13:02:45 GMT+09:00 2019, gendo@example.com, Gendo, NERV, Shinji, Eva1, Mankind’s greatest fear is Mankind itself., , , , , , , , , , Done] [19-03-30 21:36:23:490 JST] writeConts: 1.0 [19-03-30 21:36:23:490 JST] Successful! [19-03-30 21:36:23:491 JST] i: 1.0 [19-03-30 21:36:23:492 JST] value: [Fri Mar 29 13:02:45 GMT+09:00 2019, gendo@example.com, Gendo, NERV, Shinji, Eva1, Mankind’s greatest fear is Mankind itself., , , , , , , , , , Done] [19-03-30 21:36:23:492 JST] writeConts: 2.0 [19-03-30 21:24:55:236 JST] valueRange.length: 8.0 [19-03-30 21:24:55:238 JST] Successful! [19-03-30 21:24:55:239 JST] i: 0.0 [19-03-30 21:24:55:240 JST] value: [Thu Mar 28 13:02:45 GMT+09:00 2019, gendo@example.com, Gendo, NERV, Shinji, Eva1, Mankind’s greatest fear is Mankind itself., , , , , , , , , , Done] Source; 1st Code: devel-old/sendRichMsg.js, 2nd: topic-getValueRange/sendRichMsg.js
  • 23. 6-3.Appendix Add Libraries See A Demo Source; Demo: @gkzvoice Code: https://github.com/gkzz/gas-handson Moment.js library key; MHMchiX6c1bwSqGM1PZiW_PxhMjh3Sh48
  • 24. 6-4.Appendix Get Incoming Webhook URL https://api.slack.com/apps
  • 25.
  • 26.
  • 28.
  • 30. 6-7.Appendix Get userID through Tester https://api.slack.com/methods/users.list/test <Your WorkSpace Name> xoxb-aaaaaaaaaa
  • 31. 6-8. Deploy as Web App, Enable Events --Work in Progress---
  • 32. 6-9. All Sample Codes Go to the Following Github Page https://github.com/gkzz/gas-handson