The First Script with Google Apps

Google provides many other powerful applications besides search engine. Many people use Google Calendar, Docs, Drive, Gmail, and Sheets. Google Apps Script lets you do even more with Google. All on a JavaScript platform in the cloud.

Here is how you can create the standalone script.

  • Open browser at https://script.google.com.
  • Select Blank Project.
  • Type Logger.log(“Hello World”); inside default myFunction

So you will have the following function:
function myFunction()
{ Logger.log(“Hello World”); }

  • Click on Run and then myFunction to run this script
  • Click on View and then Logs to view output of this script.

In this case we used Logger object to have script to print to console. Below are few links for resources about Apps Script

https://developers.google.com/apps-script/reference/base/

http://www.acertainblog.com/2012/12/writing-google-apps-script.html

http://gotofritz.net/blog/tutorials/getting-started-part-1/

This was a very simple basic script but it is showing how quickly to start with google scripting.
In the future we will look at more practical scripts.



Leave a Comment