Introduction to Google Apps Platform Prasetyo Andy W. @praw
Who am I?
What are we talking about?
Google Apps Platform Apps Script Application APIs Domain Admin APIs Auth APIs
What is Google Apps Script?
Apps Script JavaScript cloud scripting language Automate tasks across Google products and 3rd party services
What you can do with it? Automate repetitive processes and workflows Link Google products with third party services Create custom spreadsheet functions Build rich GUI and menus
Development Environment Browser No client libraries needed to install and server to maintain Direct access http://script.google.com
Prerequisites Google Account Supported web browser Basic understanding of JavaScript
Google Apps Script Security Model Grant access needed to any scripts you run that accesses private data Script permission level and access Standalone scripts Container-bound scripts Container owner Container editor Container viewer
Building your first script We will create standalone script There are two ways to create a new standalone script: From Google Drive, choose Create > More > Script Go to https://script.google.com
Building your first script Let’s try to create a simple one: create a new Google Docs email you a link to the newly created document
Executing a script Script editor Custom function in a spreadsheet Web app Gadget in Google sites Container extension Time-driven trigger Container-specific trigger
Executing a script click Run icon or choose Run > createAndSendDocument from the menu
More about Apps Script Tutorials: https://developers.google.com/apps-script/ articles
Building user interfaces HTML Service UI Service GUI Builder
Storing data Script and user properties ScriptDb Spreadsheets JDBC
Events and Triggers Events: action that happens when the state of an object changes Clock tick events Script installation events Spreadsheet open events Spreadsheet edit events Spreadsheet form submit events
Events and Triggers Trigger: type of script resource that listens to a particular event and executes a function when that event fires
Now, let’s talk about Application API
Application API Allow developers to write applications that access Google Applications: Gmail, Calendar, and many others using Google Data APIs, Gadgets and Google Apps Script Based on JSON and Atom and RSS syndication formats and the Atom publishing protocol
Application APIs Calendar API Tasks API Gmail API Contacts API Document List API Spreadsheet API Site API
Prerequisites Get a Google Account Try out Google apps (Calendar, Contacts, Docs, etc) Register your project, visit APIs Console (https:// code.google.com/apis/console) Learn about REST Learn about JSON data format
Invoke the API Using REST directly Using client libraries
Restful APIs https://www.googleapis.com/{apiName}/{apiVersion}/ {resourcePath}?{parameters} Returns JSON format
Client Library Client library is available for: Java PHP Python .NET Ruby
Calendar API Lets you develop client applications that create new events, edit or delete existing events, and search for events Integrates your apps with Google Calendar, suits for apps that need to display Calendar and synchronizes it with Google Calendar Uses JSON starting on v3
Tasks API provides developers with a powerful set of API endpoints for searching, reading, and updating Google Tasks content and metadata Various integration projects with web apps or other Google APIs, use Google Task API to manage Google task lists in a mobile app
Gmail API Help you and your users interact with, configure, and extend Gmail Some possibilities: Gadgets OAuth Access to IMAP or SMTP IMAP Extension Gmail Inbox Feed Email Migration API Email Settings API
Contacts API Allows client applications to create, edit or delete user’s contacts Supports protocol (via curl or wget), Java, .NET and Python
Document List API Allows developer to create, retrieve, update and delete Google Docs Included advanced features like resource archives, OCR (Optical Character Recognition), translation and revision history Useful for storing data in the cloud, perform resource management, convert document formats, etc
Spreadsheets API Managing worksheets in a Google spreadsheet Consuming the rows of a worksheet Managing cells in a worksheet by position
Spreadsheets API Common examples: Computing financial data stored in an inaccessible system Presenting statistics to users in a web browser Consuming data entered into a spreadsheet by a user
Sites API Allows client applications to access, publish, and modify content within a Google Site Access and modify Google Site data using Google Data API feeds
You can do it all, if we implement Auth APIs
Auth API Allows third-party applications to get limited access to a user’s Google accounts for certain types of activities
Auth API OAuth 2.0 OAuth 1.0 Hybrid Protocol OpenID
OAuth 2.0 Used for authentication and authorization Relatively simple
OAuth 2.0 Four steps of accessing Google API using OAuth 2.0: 1. Register application 2. Obtain an access token from the Google Authorization Server 3. Send the Access Token 4. Refresh the Access Token
OAuth 2.0 scenarios Login Web server Client-side Installed apps Devices Services accounts
OAuth 2.0 Endpoint: https://accounts.google.com/o/oauth2/ auth2 Parameters: response_type redirect_uri scope state
Okay, let’s move on and talk about Domain Admin API
Domain Admin APIs Allows developers to write applications to manage Google Apps domains Migrate from and integrate with existing IT infrastructure, create users, update settings, audit activity and more Based on JSON for Admin Audit API and Groups Settings API, others are based on RSS syndication formats
Domain Admin API Audit API Email Migration API Admin Audit API Email Settings API Email Audit API Groups Settings API Admin Settings API Provisioning API Calendar Resource API Reporting API Shared Contacts API User Profiles API
Examples Au-to-do
Examples Au-to-do
Examples Hojoki.com
Examples Hojoki.com
Thank you! Prasetyo Andy W. @praw

Introduction to Google Apps Platform

  • 1.
    Introduction to GoogleApps Platform Prasetyo Andy W. @praw
  • 2.
  • 3.
    What are wetalking about?
  • 4.
    Google Apps Platform AppsScript Application APIs Domain Admin APIs Auth APIs
  • 5.
    What is GoogleApps Script?
  • 6.
    Apps Script JavaScript cloudscripting language Automate tasks across Google products and 3rd party services
  • 7.
    What you cando with it? Automate repetitive processes and workflows Link Google products with third party services Create custom spreadsheet functions Build rich GUI and menus
  • 8.
    Development Environment Browser No clientlibraries needed to install and server to maintain Direct access http://script.google.com
  • 9.
    Prerequisites Google Account Supported web browser Basic understanding of JavaScript
  • 10.
    Google Apps ScriptSecurity Model Grant access needed to any scripts you run that accesses private data Script permission level and access Standalone scripts Container-bound scripts Container owner Container editor Container viewer
  • 11.
    Building your firstscript We will create standalone script There are two ways to create a new standalone script: From Google Drive, choose Create > More > Script Go to https://script.google.com
  • 12.
    Building your firstscript Let’s try to create a simple one: create a new Google Docs email you a link to the newly created document
  • 14.
    Executing a script Script editor Custom function in a spreadsheet Web app Gadget in Google sites Container extension Time-driven trigger Container-specific trigger
  • 15.
    Executing a script clickRun icon or choose Run > createAndSendDocument from the menu
  • 16.
    More about AppsScript Tutorials: https://developers.google.com/apps-script/ articles
  • 17.
    Building user interfaces HTML Service UI Service GUI Builder
  • 18.
    Storing data Scriptand user properties ScriptDb Spreadsheets JDBC
  • 19.
    Events and Triggers Events:action that happens when the state of an object changes Clock tick events Script installation events Spreadsheet open events Spreadsheet edit events Spreadsheet form submit events
  • 20.
    Events and Triggers Trigger:type of script resource that listens to a particular event and executes a function when that event fires
  • 21.
    Now, let’s talkabout Application API
  • 22.
    Application API Allowdevelopers to write applications that access Google Applications: Gmail, Calendar, and many others using Google Data APIs, Gadgets and Google Apps Script Based on JSON and Atom and RSS syndication formats and the Atom publishing protocol
  • 23.
    Application APIs CalendarAPI Tasks API Gmail API Contacts API Document List API Spreadsheet API Site API
  • 24.
    Prerequisites Get aGoogle Account Try out Google apps (Calendar, Contacts, Docs, etc) Register your project, visit APIs Console (https:// code.google.com/apis/console) Learn about REST Learn about JSON data format
  • 25.
    Invoke the API Using REST directly Using client libraries
  • 26.
    Restful APIs https://www.googleapis.com/{apiName}/{apiVersion}/ {resourcePath}?{parameters} Returns JSON format
  • 27.
    Client Library Clientlibrary is available for: Java PHP Python .NET Ruby
  • 28.
    Calendar API Lets youdevelop client applications that create new events, edit or delete existing events, and search for events Integrates your apps with Google Calendar, suits for apps that need to display Calendar and synchronizes it with Google Calendar Uses JSON starting on v3
  • 29.
    Tasks API provides developerswith a powerful set of API endpoints for searching, reading, and updating Google Tasks content and metadata Various integration projects with web apps or other Google APIs, use Google Task API to manage Google task lists in a mobile app
  • 30.
    Gmail API Help youand your users interact with, configure, and extend Gmail Some possibilities: Gadgets OAuth Access to IMAP or SMTP IMAP Extension Gmail Inbox Feed Email Migration API Email Settings API
  • 31.
    Contacts API Allows clientapplications to create, edit or delete user’s contacts Supports protocol (via curl or wget), Java, .NET and Python
  • 32.
    Document List API Allowsdeveloper to create, retrieve, update and delete Google Docs Included advanced features like resource archives, OCR (Optical Character Recognition), translation and revision history Useful for storing data in the cloud, perform resource management, convert document formats, etc
  • 33.
    Spreadsheets API Managing worksheetsin a Google spreadsheet Consuming the rows of a worksheet Managing cells in a worksheet by position
  • 34.
    Spreadsheets API Common examples: Computing financial data stored in an inaccessible system Presenting statistics to users in a web browser Consuming data entered into a spreadsheet by a user
  • 35.
    Sites API Allowsclient applications to access, publish, and modify content within a Google Site Access and modify Google Site data using Google Data API feeds
  • 36.
    You can doit all, if we implement Auth APIs
  • 37.
    Auth API Allows third-partyapplications to get limited access to a user’s Google accounts for certain types of activities
  • 38.
    Auth API OAuth 2.0 OAuth1.0 Hybrid Protocol OpenID
  • 39.
    OAuth 2.0 Used forauthentication and authorization Relatively simple
  • 40.
    OAuth 2.0 Four stepsof accessing Google API using OAuth 2.0: 1. Register application 2. Obtain an access token from the Google Authorization Server 3. Send the Access Token 4. Refresh the Access Token
  • 41.
    OAuth 2.0 scenarios Login Webserver Client-side Installed apps Devices Services accounts
  • 42.
  • 43.
    Okay, let’s moveon and talk about Domain Admin API
  • 44.
    Domain Admin APIs Allowsdevelopers to write applications to manage Google Apps domains Migrate from and integrate with existing IT infrastructure, create users, update settings, audit activity and more Based on JSON for Admin Audit API and Groups Settings API, others are based on RSS syndication formats
  • 45.
    Domain Admin API AuditAPI Email Migration API Admin Audit API Email Settings API Email Audit API Groups Settings API Admin Settings API Provisioning API Calendar Resource API Reporting API Shared Contacts API User Profiles API
  • 46.
  • 47.
  • 48.
  • 49.
  • 50.

Editor's Notes