Showing posts with label open source. Show all posts
Showing posts with label open source. Show all posts

Saturday, March 6, 2010

Google Apps Script in managing your work






Currently, I'm running this Interest Group in my school about Open Source and to ease the task of it, I use Google Apps to create forms and broadcast them around school. Students who are interested in joining the group will fill in their personal information and contacts. This data then goes to the spreadsheet and with Google Apps Script, I have automated the task to publish information on the website created with Google sites. There are few tutorials on the Google website which you can check out. In this post I would like to share how I have managed to integrate all these services together.
Note: As until now, Google Script seems to be not available to normal gmail accounts. However, you can easily create your own domain account with the email of your school or company.

The following is my own script to update a ListPage on the Google Sites. Things you need to do before-hand:
  1. Create your own form with basic information (this will automatically create a spreadsheet for you). You can see how my spreadsheet looks like on the above picture.
  2. Create a Google Site and give it a name.
  3. Create a page and choose ListPage as a template.

Now we shall begin coding the script. In order to write scripts, go to Tools > Script > Script Editor. This will bring up a script editor which allows you to execute javascript code on the server. Yes, Javascript as a server-side language. The editor is quite user friendly as it has highlighting and code suggestions.

This is just a basic example of how you can use Google Apps Script. The whole API can be found on Google, it provides access to Google Service such as Calendar, Contacts, Gmail, Google Translate, Spreadsheet. Besides, you can use it with external applications as well (using UrlFetch, XML and SOAP services).