"Here’s the scenario: you create a form, you have a script that triggers onFormSubmit and all is well... until it gets popular. Occasionally you start having interlacing modifications from separate invocations of your script to the spreadsheet. Clearly, this kind of interlacing is not what you intended for the script to do. Up until now, there was no good solution to this problem -- except to remain unpopular or just be lucky. Neither are great solutions.
Now, my friend, you are in luck! We’ve just launched the LockService to deal with exactly this problem. The LockService allows you to have only one invocation of the script or portions thereof run at a time. Others that would’ve run at the same time can now be made to wait nicely in line for their turn. Just like the line at the checkout counter."
"The Google Apps Script team is on a roll and has implemented a ton of new features in the last few months. Some of us “Top Contributors” thought it will be a useful exercise to revisit the Mail Merge use case and discuss various ways in which we can do Mail Merge using Apps Script. Below are several techniques that tap into the power of Google Apps Script by utilizing Gmail, Documents and Sites to give your mailings some zing. Mail Merge is easy and here is how it can be done."
This is Part 4 in a series about an example app that I put together to demonstrate and describe the use of various Google Apps Script features. See Part 1 for an introduction. This part is "Synchronising the URL list in the spreadsheet with corresponding tasks in the chosen tasklist".
"You can use this simple script which will run and add a label to your messages (in addition to existing labels which you might already have) which have attachments of 1, 5, 10, 20 or 50MB. Off course you can customize the script to allow additional/different capacities."
This is Part 2 in a series about an example app that I put together to demonstrate and describe the use of various Google Apps Script features. See Part 1 for an introduction. This part is “Using the Tasks API to retrieve and insert tasklists, and the Ui Services to build the tasklist chooser component“.
As you noted, Google Apps Script is excellent for data workflows. It acts as a super glue for various data repositories (e.g. spreadsheets, sites, gdocs, gmail) in the Google Apps suite. However, I am noticing that it is not so ...
By setting up a Google Apps Script to monitor his gmail inbox Google Engineer Drew Csillag is able to automaticaly populate a Google Spreadsheet of his dailly calorie intake populated from emails he sends himself.
Something I’ve been meaning to do for a while is find a way to quickly (and freely) analysis a twitter stream to identify the audience sentiment. You can pay big bucks for this type of solution but fortunately viralheat have a sentiment API which gives developers 5,000 free calls per day. To use this you push some text to their API and you’ll get back the text mood and probability that the sentiment detected is correct (more info here).
So here is a second-by-second sentiment analysis of Donald and Joe’s presentations, followed by how it was done (including some caveats about the data).
The tutorial by Romain Vialard shows how to setup gmail to send you an email at the beginning of each month showing statistics for the previous month, such as the number of emails you received, the top 5 to whom you sent email, the top 5 from whom you received email, charts on your daily usage.
This is Part 5, the last part in a series about an example app that I put together to demonstrate and describe the use of various Google Apps Script features. See Part 1 for an introduction. This part is "Putting it all together and using the OnOpen event to insert a new 2-item menu entry on the spreadsheet’s page".
"This is Part 3 in a series about an example app that I put together to demonstrate and describe the use of various Google Apps Script features. See Part 1 for an introduction. This part is “Using the UrlFetch Services to interact with the Google+ API (after all, it’s REST-based!) and grab info on articles pointed to by users in their activity stream“."
"I have lots of email I want to follow up on later or put aside for some time. I use Gmail these days, and I miss Outlook's built in feature for this. Well, there's a solution, the apps script team posted a script for "snoozing" email. My modified take on it is this gmail Follow Up script doc.
Lets look at a simple example: In a spreadsheet you need to convert calories (kcal in EU) to kilojoules (kJ), and instead of doing the calculation in cells (calories * 4.2) you like to use a function called CaloriesToKilojoules. Here's how to do that:
I was recently rediscovering an old Hirst post on Google Spreadsheets as a Database in which he demos an “interface for constructing URIs to query Google spreadsheets using the Google query language”. It got thinking one of the aspects of databases is getting data in. I tackled this when I was at Dev8D back in February with the post Collecting any data in a Google Spreadsheet using GET or POST. At the time I was planning a follow-up post to show a practical application but never got around to it.
So here is a more refined piece of code which actually records data submitted from your own form or custom code:
" Over on the Google Apps Scripts articles section of the Google Code site there’s a great article “Integrating with Google APIs – Creating a simple reading list” which takes the reader through a nice example of using a couple of APIs that have recently been made available to Google Apps Script via the Google APIs Services – the UrlShortener API and the Tasks API. Inspired by the article, I decided to take the idea a little bit further and build something I could demo and then explain at our Manchester GTUG meetup."
'This post takes the reader through a simple application, showing the steps required, the code and the supporting setup to build an automated email-to-tasks mechanism. It uses the Gmail Services, Spreadsheet Services and the new Google APIs Services, specifically Tasks.'