Google Apps Script
Follow
Find
63.8K views | +43 today
Google Apps Script
The GAS: All things related to Google Apps Script including examples, news and snippets
Curated by Martin Hawksey
Your new post is loading...
Your new post is loading...
Scooped by Martin Hawksey
Scoop.it!

Analytics reporting with Google Apps Script at the UK Cabinet Office - Google Apps Developer Blog

Analytics reporting with Google Apps Script at the UK Cabinet Office - Google Apps Developer Blog | Google Apps Script | Scoop.it

"My team at GOV.UK was tasked with creating a series of high-level metrics reports which could be sent daily to ministers and senior civil servants of several government departments, with the data customised for each department.

 

We discovered that an added bonus of pulling data into a Google spreadsheet was that it also allowed us to publish the data to a Google site. This helped us display data to stakeholders without adding lots of users to our Google Analytics account."

 

 

more...
No comment yet.
Scooped by Martin Hawksey
Scoop.it!

Using open-source libraries in Apps Script - Google Apps Developer Blog

Using open-source libraries in Apps Script - Google Apps Developer Blog | Google Apps Script | Scoop.it

"JavaScript has long been the de facto choice for client-side web development, but lately it's been catching on server-side as well. While we like to think that Apps Script has contributed to the trend, projects such as Mozilla's Rhino and Node.js have also done a great deal to popularize the concept. As a result, developers have created a wealth of new open-source JavaScript libraries, and in this post we'll talk about how you can leverage them in your Apps Script projects.


Underscore
One library I wanted to use in my scripts was Underscore, which describes itself as "a utility-belt library for JavaScript." It provides a wealth of helper functions that make coding in JavaScript cleaner and more enjoyable."

more...
No comment yet.
Scooped by Martin Hawksey
Scoop.it!

Google Apps Script Liberation - publishing your stuff (embedding apps script code and much more!) by Bruce McPherson

Google Apps Script Liberation - publishing your stuff (embedding apps script code and much more!) by Bruce McPherson | Google Apps Script | Scoop.it

"Usually on this blog and the associated site I cover topics to do with getting data in an out of Excel. Lately though, I've been playing around with using Google Apps Script as a proxy and publishing data out of Google Apps Scripts.

 

I've brought many of those concepts together to create a single publisher to expose your scripts, scriptdb data and other public content in a variety of formats such as standalone web page, a js function that returns the html code for a page, as json data and as jsonp data. I've also included a code prettifier and json beautifier in the code.

 

The main purpose of this is to be able to publish your code snippets or scriptdb data as dynamic content in iFrames in other web sites, or to get the content as Json data. However, same domain restrictions on iFrames and jSon make this hard to achieve. The js and jsonp options mitigate these issues allowing you to embed source code in a variety of hosts. Here is how it fits together."

more...
No comment yet.
Scooped by Martin Hawksey
Scoop.it!

New Blog: Google Apps Script Snippets by Tim Saunders @gassnippets

New Blog: Google Apps Script Snippets by Tim Saunders @gassnippets | Google Apps Script | Scoop.it

Tim Saunders has started a new blog of Google Apps Script Snippets. Current posts include:

 

* Create your first Google Apps Script

* Understanding the Form Submission Trigger

* Creating a usable object from a form submission

* Creating a formatted HTML table in an email body

more...
No comment yet.
Scooped by Martin Hawksey
Scoop.it!

Get started at no cost with a faster, larger Cloud SQL database - (Inc Google Apps Script integration)

"Integration with Google Apps Script: We’re making it quick and easy for businesses using Google Apps to use Cloud SQL. Publish and share data with Google Sheets, add data to Google Sites pages or create simple Google Forms without worrying about hosting or configuring servers."

more...
No comment yet.
Scooped by Martin Hawksey
Scoop.it!

A Text-only Browser Powered by Google Scripts by Amit Agarwal (@labnol)

A Text-only Browser Powered by Google Scripts by Amit Agarwal (@labnol) | Google Apps Script | Scoop.it
The text-only web browser runs in the Google Cloud and is powered by Google Apps Script. You can also use it as a proxy server.
more...
No comment yet.
Rescooped by Martin Hawksey from desktop liberation
Scoop.it!

Excel Liberation.: Somewhere to keep those API keys: google apps script rest library entry

Excel Liberation.: Somewhere to keep those API keys: google apps script rest library entry | Google Apps Script | Scoop.it

In the builtwith.com api rest library entry for Excel I covered how to get data about a given web site using the builtwith.com API. I went against my usual rule here, by including an api that needs an API Key. Here's how to securely store your API keys in one place, and use them without exposing them in your code. 


Via brucemcpherson
more...
No comment yet.
Scooped by Martin Hawksey
Scoop.it!

Using @joliprint API with Google Apps Script by @tomsyweb

more...
No comment yet.
Rescooped by Martin Hawksey from desktop liberation
Scoop.it!

Proxy jsonp - How to use Google Apps Script to avoid same origin json problems

Proxy jsonp - How to use Google Apps Script to avoid same origin json problems | Google Apps Script | Scoop.it

If you are reading this, I guess you are familiar with this error message "XMLHttpRequest cannot load somedata.json. Origin null is not allowed by Access-Control-Allow-Origin."

This is of course the same origin policy that prevents you being able to access jSon data that is stored on a different domain than your javaScript Code. This is really annoying if you are trying to use publicly hosted data, but there are ways round it.

 

Here's how to use Google Apps Script as a Proxy for all your jsonp needs.


Via brucemcpherson
more...
Suggested by wterral
Scoop.it!

Teacher Mini-Observation Tracking System using Google Forms and Google Apps Scripts by Andrew Stillman

Teacher Mini-Observation Tracking System using Google Forms and Google Apps Scripts by Andrew Stillman | Google Apps Script | Scoop.it

Problem

"How can overburdened school administrators manage their workflow to enable short mini-observations aligned to a teacher effectiveness framework like Danielson without getting locked into expensive, proprietary software?"

 

Solution

"This well thought-out template, created by a collaboration between a highly successful NYCDOE principal and an Apps Script developer, makes data entry a snap, helps administrators prioritize observations, and supports communications with teachers."

 

more...
No comment yet.
Rescooped by Martin Hawksey from desktop liberation
Scoop.it!

Storing and serving up images from scriptDB with Google Content Service, jSonP and jQuery

Continuing the theme of using Google Apps Script Content service and scriptDB for lots of things, today's post cover a few tricky topics.

- How to convert an image to a blob so it can be stored in scriptDB.
- How to use the content service as a server so that we can serve up that image to some request
- How to respond to a jSonP request from Google Content service to get over cross domain request problems
- How to convert that back into an image in jQuery


Via brucemcpherson
more...
No comment yet.
Scooped by Martin Hawksey
Scoop.it!

Word Cloud Creator - Google Script Examples by Romain Vialard

Word Cloud Creator - Google Script Examples by Romain Vialard | Google Apps Script | Scoop.it

"This library provides one single method to create an HTML Word Cloud from a text input. You can also use this library outside of Apps Script: This Word Cloud Creator is available as a REST API and a Web Application." 

more...
No comment yet.
Scooped by Martin Hawksey
Scoop.it!

Managing tasks and reminders through Google Apps Script - By Romain Vialard

Managing tasks and reminders through Google Apps Script - By Romain Vialard | Google Apps Script | Scoop.it

"There are many tools available to help you manage a task list and Google Apps comes with its own simple Tasks app. But sometimes it is more convenient and collaborative to simply manage your task list in a shared spreadsheet. This spreadsheet can be a simple personal task list or a project-management interface that requires team-wide coordination.

 

Google Spreadsheets come with a set of notification rules that might come in handy. For example, you can be notified each time someone adds a new task to the list or each time the status of a task is updated. Furthermore, it is very easy add to add basic reminders through Apps Script with just a few lines of code ..."

more...
No comment yet.
Scooped by Martin Hawksey
Scoop.it!

Peter Herrmann makes Google Apps Script release notes available in RSS

Peter Herrmann makes Google Apps Script release notes available in RSS | Google Apps Script | Scoop.it
Google Apps Script release notes available in RSS
more...
No comment yet.
Scooped by Martin Hawksey
Scoop.it!

Color Code+ gives you the ability to reference cells when applying conditional formatting in Google Spreadsheets.

Color Code+ gives you the ability to reference cells when applying conditional formatting in Google Spreadsheets. | Google Apps Script | Scoop.it
Color Code+ gives you the ability to reference cells when applying conditional formatting in Google Spreadsheets. It covers most of the basic cases, but there's a link to request additional help and see examples of what you can do.
more...
No comment yet.
Suggested by Jacob Jan Tuinstra
Scoop.it!

Code-Infection Blog: Google Calendar and Google Apps Script by Balazs Nadasdi

Code-Infection Blog: Google Calendar and Google Apps Script by  Balazs Nadasdi | Google Apps Script | Scoop.it

Manage overtime with google calendar and drive with google apps script

 

via Jacob Jan Tuinstra

more...
No comment yet.
Scooped by Martin Hawksey
Scoop.it!

Delegation to Google Apps Script - Excel Liberation by Bruce McPherson

Delegation to Google Apps Script - Excel Liberation by Bruce McPherson | Google Apps Script | Scoop.it
" In a number of articles I've covered how to use GAS for jsonp, oauth, as a lockbox and various other useful things. There are many threads to pull together in this section, so here's a step by guide to GAS proxying as described in this post."
more...
No comment yet.
Rescooped by Martin Hawksey from desktop liberation
Scoop.it!

Excel Liberation.: Publishing Google Apps Script code snippets by Bruce McPherson

In a previous post I showed how Google Apps Script could return the contents of a script as Json so you could format that for including script samples on web sites.

Today, here is how to use the html service to format that code.  It takes arguments of ?module=xxx&template=yyy and will use html template yyy, to publish module xxx.

 

Here is Google Apps Script, using the html service to publish script code. eg http://bit.ly/YRcqIS


Via brucemcpherson
more...
No comment yet.
Scooped by Martin Hawksey
Scoop.it!

Google Apps Script - Forward travel confirmations to TripIt for indexing

Google Apps Script - Forward travel confirmations to TripIt for indexing | Google Apps Script | Scoop.it
" Tripit can be configured to automatically browse through all your email looking for travel information. Although I really like their product, I’m not really comfortable letting them dive into my personal email. So for some time I’ve been manually forwarding them all travel confirmations for indexing.

Some time ago a friend of mine told me about Google Apps Script. I have to say that I’m very, very impressed with what Google has pulled of here! From knowing nothing at all to having working code that automated my previously manual GMail workflow just took me an hour!"

See post for code
more...
No comment yet.
Scooped by Martin Hawksey
Scoop.it!

Tutorial: how to build a simple CRM with google apps script [part2] | Daviom

Tutorial: how to build a simple CRM with google apps script [part2] | Daviom | Google Apps Script | Scoop.it

"In this tutorial, you will learn to:

* Create a new Spreadsheet in Google Drive
* Create 2 tables: one with the customers data, one with the orders
* Model your data in the tables so that it can be filtered and correctly maintained
* Write a script that will send via email a report of the purchase history of a customer"

more...
No comment yet.
Scooped by Martin Hawksey
Scoop.it!

Announcing Election Info: Using Apps Script to Provide Voting Information - Google Apps Developer Blog

Announcing Election Info: Using Apps Script to Provide Voting Information - Google Apps Developer Blog | Google Apps Script | Scoop.it

"Election Info is a sample application built using Apps Script that can:


* Query the Google Civic Information API to find polling locations and hours using client side JavaScript and AJAX.
* Display polling information using HtmlService with jQuery for a clean effective UI.
* Generate static maps via UrlFetch and the MapsService to show polling maps and directions.
* Create a calendar event for election day with your polling location using the Calendar service.
* Generate a bring-along document with poll directions and hours using the Document service.
* Send you an email with a summary with your polling place information using the Gmail service.
* Store your previous searches in UserProperties so it will remember your likely home address the next time you launch the app."

more...
No comment yet.
Scooped by Martin Hawksey
Scoop.it!

Little Google Apps Script to notify if I'm due an uptime refund

My web host has a 99.9% uptime guarantee and I get account credit if it falls below that. Unfortunately I have to apply each month to get the credit if its due. So I don't forget I made a Google Sheet/Apps Script which uses importHTML to grab the server uptime table http://www.site5.com/support/uptime/s2-london/then MailApp to email me if credit is due (unfortunately I need to submit credit request via their ticket system otherwise it would all be completely automated). The code I use is

// add Resource > Current script's trigger to add refundDue as a week timer
function refundDue() {
  var doc = SpreadsheetApp.getActiveSpreadsheet();
  var sheet = doc.getSheetByName("Sheet1");
  var uptime = sheet.getRange("c3").getValue();
  var date = new Date().getDate();
  var emailAdd = "youremailaddress@gmail.com";
  if (date <= 7){
    if (typeof uptime == "number" && uptime < 0.999){
      MailApp.sendEmail(emailAdd, "Uptime refund due", "Uptime recorded as "+uptime+" http://www.site5.com/support/uptime/s2-london/ \n\nRequest refundhttps://backstage.site5.com/client/helpdesk/list/");
    } else {
      MailApp.sendEmail(emailAdd, "Failed: Uptime refund due");
    }
  }
}

more...
No comment yet.
Scooped by Martin Hawksey
Scoop.it!

Gmail Timer - Schedule when to receive new mail by Musubi Google Apps Script

Gmail Timer - Schedule when to receive new mail by Musubi Google Apps Script | Google Apps Script | Scoop.it

"Gmail Timer is a Google Apps Script which lets you take control of how often you’re interrupted by email. Timer will divert all of your incoming email into a folder until moving them all into your inbox on an interval you specify, whether once an hour, once a day, or anywhere in between." 

more...
No comment yet.
Scooped by Martin Hawksey
Scoop.it!

Heatmapping Conversion Rates, Automagically (with Google Apps Script) by David Fothergill

Heatmapping Conversion Rates, Automagically (with Google Apps Script) by David Fothergill | Google Apps Script | Scoop.it

"n this post I will briefly discuss the introduction of automated Google Analytics reports, and then share with you a report I created you that quickly generates a Conversion Heatmap via the GA API" 

 

via Eric Koleda

more...
No comment yet.