You are here: Romneya » All, Google Apps »

Google Apps Script: Swiss army knife of Google Apps

Google Apps Script: Swiss army knife of Google Apps

Swiss army knifeThe Swiss army knife is popular because of its different uses: it shears, uncorks bottles, slices and does a lot more. Google Apps also has its own Swiss army knife: Google Apps Script.

Simply great for your endless list of little things you want to automate fast without much effort.

Need an example? How about sending a ‘Google Apps tip of the day’ to pilot Apps users for a week?

Since a couple of days one of our potential customers started testing Google Apps. It seemed a good idea to us to send the project manager a ‘tip of the day’ email on the subject of Google Apps for a week and keep the conversation going. Just, how do you get started?

In the ‘traditional’ way I would write a small script and run that script via a scheduled cron job on some server somewhere. Unfortunately that is rather difficult as Romneya is a ‘server-less‘ company. All the applications that we use are SaaS based.

By the way, why not make this a small application with an entry form and a small database to ensure that other project managers or testers can also receive a daily tip? Neat idea, but how do you set it up without having to deal with the underlying technology and infrastructure? Right, use the Swiss army knife in Google Apps: Google Apps Script!

As a first step in the direction of a simple, but working, solution let us use a Google Form. Any Romneya employee can use it to enter the name, first name and email address of the person that he/she wants the daily tip to receive.

In our case the Google Spreadsheet has two sheets: a user overview and a second sheet with a column with the daily tips content. In the user overview we also keep track of which tip has already been sent to whom.

Google Form overview

In the spreadsheet we can use the embedded script editor to code in Javascript. The documentation describes what you can do with Script. Of course it is (fairly) easy to send to or retrieve information from other applications that are part of the Google Apps offering; Google Sites, Google Docs and Google Calendar.

Google Apps script editor

Perhaps it is not the most elegant code, but 63 lines of Javascript ensure that every person in the list receives a customized email with five consecutive tips.

Google Apps Script triggers

Triggers allows to define when the script should be executed: on opening the spreadsheet, on saving, on form input or according to a schedule. In our case we only need to define five triggers, Monday till Friday, to have everyone on the list receive the information.

And then the really good news: total time spent… less than ONE hour.

Of course this utility is not scalable for a list with five thousand users. Of course it would probably be better, nicer, more feature-rich if done in a ‘real’ application development environment.
But is not that the essence of a Swiss army knife? To be an excellent tool do get things done FAST?

So, have you used Google Apps Script? What did you do with it?

Discussion

Leave the First Comment Here