Recipe and code for using R to fetch a Google Spreadsheet as a *.csv, do something with the data and then push the data back to the original spreadsheet using Google Apps Script and Publish as a service
Using Google Calendar SMS notifications for guest invitations this script shows how you might uses these feature to send free text messages to students (true for the UK on selected operators - might not work in other regions)
"This project will effectively combine Google Apps for Education and Google Apps Script in order to create a tool which allows tutors to enter grades and feedback in a single spreadsheet which then automatically populates individual feedback proforma, simultaneously sharing these results with students, progress tutors, and administrators as appropriate."
"Managing the user accounts in a Google Apps domain can be a daunting task when you have hundreds or thousands of them and you have no tools to automate the process. The Google Apps Provisioning API allows developers to write user management applications in the programming language of their choice, but many system administrators prefer a script-based solution instead. The recently launched UserManager Apps Script service fills the gap, providing Google Apps domain administrators an easy way to automate tasks such as batch user creation or update. With the new Apps Script service, creating a user will be as easy as writing a single line of code"
Instead I switched to getting the Pipe as JSON. JSON input powers a lot of my other Google Spreadsheet toys like TAGS and Google+ network generator so I’ve a growing bank of code snippets I can throw together.
Here’s my ‘Frankenstein’ code to read a JSON source and write to a sheet. Two little tricks in here are to recast the pubDate as a date so that it’s interpreted as such in the spreadsheet and writing the JSON objects to a sheet using normalised column headers to identify object elements (I borrowed this technique from the writing data Apps Script tutorial).
One of the first tutorials I did when starting with Google Apps Script was the Simple Mail Merge tutorial. Since then some of the Google Apps Script top contributors guest posted 4 ways to do Mail Merge using Google Apps Script. Today when I was trying to solve my own html email problem I decided a solution that best fitted my needs was using a slight variation of the Simple Mail Merge but letting the user use wiki markup to format the text.
"When it comes to writing UI applications in Apps Script, we get a lot of requests to support event callbacks that are handled in the user’s browser. For example, if your application has a form, you may want to disable a button after it is clicked the first time. Until now, the only way to do that would be by using an event handler on the server to disable that button. Using Client Handlers, your application can now respond to events in the browser without the need to perform a round trip to Google Apps Script servers.
By cutting out the round trip to the server, your app can respond instantly to user input. Imagine, for example, you want to provide your users with instant feedback within your app when a user types text where a number is expected. Ideally, you would want to warn users as they type the value, instead of waiting until the form is submitted. Having a server event handler for each keystroke is definitely overkill for such a simple and common task. Luckily, these use cases are now supported with Apps Script’s new Client Handlers and validators!"
"Disclaimer: I fully understand the risks/downsides of using eval but this is one niche case where I couldn't find any other way.
In Google Apps Scripting, there still is no built-in capability to import a script as a library so many sheets can use the same code; but, there is a facility built-in where I can import text from a plaintext file. ..."
To support my research in Twitter community visualisation I’ve updated my Twitter Archiving Google Spreadsheet (TAGS) [formerly called twitteralytics – I pre-emptively changed the name to play nice with Twitter ToS].
This new version has some coding improvements and new features including a dashboard summary and advanced tools for getting user profile information and friend/follower relationships for social network analysis.
Found a good sample on the forums of something I had a hard time finding in the API reference or other docs. Posted a script on GitHub that allows you to add/remove controls for a UiApp in the callbacks attached to buttons.
For the next step I wanted to do something similar with the Open Archives Initiative Protocol for Metadata Harvesting (OAI-PMH). You can read more about OAI-PMH here but basically its a method for repositories to share information about the resources they’ve got.
Here is a script I wrote to read OAI service ListIdentifiers and write to a spreadsheet. Using this with the SWAPBox repository we can get a distribution of submissions (the spreadsheet for this is here)
A while ago Tony (Hirst) posted a Fragment: Looking up Who’s in Whose Google+ Circles…,which highlights how friend and follower information can be extracted from Google using an undocumented API. Tony followed this up with So Where Am I Socially Situated on Google+? in which he used a genius bit of Python scripting to extract a large fragment of his extended Google+ network which he then processed in Gephi.
Here’s my take on the problem, a Google Spreadsheet template to extract Google Plus network information for analysis in the tool of your choice, in my case NodeXL.
This diagram was generated from a twitter search archive stored in Google Spreadsheet using the TAGS template. Connections are created by using Apps Script to fetching data from the Google Social Graph API and storing as a two column list. The webpage then uses the Google Visualisation API to query the spreadsheet data and generate a force layout diagram using the d3.js library ('Top Nodes graph is generated using Google Visualization API).
Check the 'Help' tab on the webpage for more information
"One of the things I'd been wanting to do for the camp is create a blog where news and developments can be published. Google Sites offers an "Announcement" page type, but it's not really as nice to work with a Blogger, as I had discovered here already. But the trouble with trying to combine a Blogger blog with a Google Sites website, is that both use templates neither of which can easily be made to be part of the other.