Showing posts with label Google Data API. Show all posts
Showing posts with label Google Data API. Show all posts

Sunday, October 24, 2010

Google App Scripts for Google Sites

If you are using Google Sites for your Public or Intranet sites, here is an awesome news for you. Google has enabled Google App Scripts for Google Sites. Google App Scripts, which is 1.5 years young can be used to automate business processes that involve multiple applications. This will be very handy if you are running a small business and want to setup the infrastructure needed for your company. You can setup multi-step workflows using the Google App scripts.

Google’s Cloud language

Google App Script, which was originally launched to automate tasks (macros) on Google Docs Spreadsheet, is a server side JavaScript that executes on the Google’s Cloud. Almost all the Google’s services can be accessed using Google App Scripts. Though Google App Scripts are not widely used yet, they have got so much of potential on the Cloud. Some of the popular services of Google App Script includes Calendar, Contacts, Mail, DocsList, Spreadsheet, URLFetch, etc. Google is also experimenting UI services using which you can create applications which interact with the users via rich graphical interfaces. Another interesting addition to the list of services is the JDBC service using which you can write JDBC queries to pull data from any of your data servers. (Supports only MySQL for now). Read more about Google App Scripts here.

Script editor showing a sample functionGoogle App Script for Google Sites

To create a new script, go to More Actions > Manage Site > App Scripts. Click on the Launch Editor option to open the editor where in you can write your scripts. Launch editor will compile and check your script for errors. Once your script is saved successfully, you can add links from your page to trigger these functions. App scripts serve as a perfect back end for all your site operations.

From Google Site, you can add links to trigger the App Script functions

Follow Google App Scripts blog to keep yourself updated on the happenings in the space. If you are new to Google App Scripts, check out this tutorial. I have created a working copy of the same on my sample site.

-- Varun

Sunday, July 18, 2010

[Learning by doing] Google Data API

The second post on the 'Learning by doing' series is about Google Data API. Google enables the developer community to extend the Google's services by exposing API for almost all of the services offered. Every service offered by Google has its own set of client libraries available in different languages including Java, .Net, Python, Javascript, etc. Some of the things like handshaking of user's credentials, accessing the user's contacts, etc will be the same across these services. The APIs are very simple yet powerful. If one develops an application using any one of these services, he / she will be able to build application easily using the other services as well.
Application to be built: Poor man's Blackberry - an application which will notify you of your meetings via SMS.

How do I start?
  • Google calendar can send notifications to your mobile phones as an SMS. Connect your mobile phone to your Google account. Check our this to connect your phone.
  • Sync your work calendar and Google calendar. Google has a tool called "Google Calendar Sync" for syncing Microsoft Outlook calendar and Google calendar. This tool can sync 2-way but it can sync the events only on the primary calendar. Install the Google Calendar Sync tool.
  • Choose the 1-way sync option: Microsoft Outlook Calendar to Google Calendar. This will incrementally sync all the meetings on your work calendar to the primary calendar of your Google account.
Now, the learning part

If you have completed the steps mentioned above, your office calendar and Google calendar would be in sync now. The problem boils down to sending SMS reminders for your meetings. When the events from your Outlook calendar is synced with the Google calendar, the SMS reminders will not be set to those events as Outlook supports only the Pop-up reminders. Your task is to write a desktop based utility which will open all the synced events and add SMS reminders to them. You can use Google Calendar API to add / delete / modify events on your calendar and add / delete / update reminders of an event. I prefer writing the utility as a desktop one as the scheduling can be done easily. Refer to the client library developer guide here.

I have the working code for doing this job. Please ping me if you need any help at any stage of the development.

-- Varun
google-site-verification: googlea4d68ed16ed2eea6.html