3. •Apps Script is a JavaScript engine in the cloud
•JavaScript Runtime
•Write code in browser, execute code in browser
•Includes
•JavaScript syntax and classes
•Built-in access to various Google APIs
•Ability to integrate 3rd party services
•Executed in a variety of different way
•Spreadsheet, site, standalone, Async
What Why and Who ?
4. What Why and Who ?
Mail
Contacts
Documents
Spreadsheets
Sites
Calendar
5. What Why and Who ?
Our Goal
‘’ anyone can script ! ‘’
7. Apps Script Services
Documents Sites
Spreadsheet Gmail
DocsList
• Read and write to various Google Docs properties
• Manage Share Settings
• Automate tasks
8. Apps Script Services - Example
function sendMail(){
var sheet = SpreadsheetApp.getActiveSheet();
var cell = sheet.getRange("A1");
var value = cell.getValue();
MailApp.sendEmail("abedmaatalla@gmail.com", “Spreadsheet test",value);
}
10. Apps Script Services - Example
function trainingEvent() {
var calendar = CalendarApp.getDefaultCalendar();
var startDate = new Date();
var endDate = new Date(startDate);
endDate.setHours(startDate.getHours()+2);
var event = calendar.createEvent("trainings", startDate, endDate,{description: "training
event"}) ;
}
12. // function to access NetFlix Api
Var Odata_GENRE_URL = ‘’ http://odata.netflix.com/catalog/genres’’ ;
Function searchNetflixTitles_(genre,startPosition,NumberOfResults){
Var requesURL = Odate_GENER_URL+ ’’ (‘ ‘’ + genre+ ’’ ‘ ) /Titles? ’’
+’’$select=Name,ShortSynopsis&$format=json&skip=‘’
+startPosition+’’&$top=‘’+numberOfResults;
Var content = UrlFetchApp(requestURL);
Var result = Utilities.jsonParse(content.getContentText());
Return result;
13. Getting Started
• Visit Apps Script documentation
• http://goo.gl/UGZlt
• Participate in online community
• Community is very activve
• Googlers are on the forum helpin users
• A place to exchange ides and not just solve problems
• Check out scripts in Gallery
• Follow Apps Script Blog
• http://goo.gl/jHcBF