Google Apps Script
Follow
Find
60.9K views | +4 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!

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.
Scooped by Martin Hawksey
Scoop.it!

See all your Google Contacts on a Google Map using Google Apps Script by Amit Agarwal

See all your Google Contacts on a Google Map using Google Apps Script by Amit Agarwal | Google Apps Script | Scoop.it
Learn how to create a Google Map using postal addresses of your contacts that are available inside Google Contacts.
more...
No comment yet.
Scooped by Martin Hawksey
Scoop.it!

Apps Script in the classroom - Google Apps Developer Blog

"Over the past few years we've seen lots of Apps Script adoption within the EDU community. Educators need lightweight systems that integrate with the Google Apps they already use. Empowered by a cloud-hosted and simple to use platform, non-programmers have been able to create powerful scripts that have a real impact on the lives of their students. In honor of World Teachers' Day we're highlighting some popular scripts educators have created and other materials teachers can use to get started."

more...
No comment yet.
Suggested by Jacob Jan Tuinstra
Scoop.it!

Building a FlexTable with multiple sheets in Google Apps Script - Jacob Jan Tuinstra

This script makes one flex table out of a spreadsheet with multiple sheets.
more...
No comment yet.
Scooped by Martin Hawksey
Scoop.it!

Automated Google Apps Script Update Notifier - Discover new Apps Script Menthods by keisuke oohashi

Automated Google Apps Script Update Notifier - Discover new Apps Script Menthods by keisuke oohashi | Google Apps Script | Scoop.it

keisuke oohashi has come up with with nice Apps Script web app that automatically looks for new methods within the Google Apps Script Services. The service is here https://script.google.com/a/macros/bfts.co.jp/s/AKfycbz98NsP02DO46Y2kTdTnhqOvqfWuJJpyuznRtfH34cazge33Ew/exec

 

To get an idea of how it was made check the comments in https://plus.google.com/112329532641745322160/posts/a7JERQDc4Ap.

 

For update notifications follow @I_hack_me http://twitter.com/I_hack_me ;

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

[Event] Neo4j + Google Apps Script Code Lab - San Francisco 29th September

[Event] Neo4j + Google Apps Script Code Lab - San Francisco 29th September | Google Apps Script | Scoop.it

"Get acquainted with Neo4j and AppScript at this Codelab by learning to connect Neo4j within a Google Spreadsheet. Using a political dataset, you will learn about graph databases, Heroku apps, and how it can be used with Google apps."

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!

Using Google Apps Script as a wrapper for multiple APIs by Bruce Mcpherson

"Lately I've been posting about the Google Apps Script Content Service and how to use it as a 'serverless' Rest API service. In addition, I covered how to use the ScriptDB as a secure repository for oAuth credentials, and using the Content Service as a proxy for other APIs that need authentication.

 

Another thing I've been playing around with in recent posts is mashing up multiple APIs, for example doing some geocoding then passing the result of that off to another API.

 

So where are am I going with all these threads? Content Service, acting as a pseudo server, allows us to either combine, or preprocess API calls. That means that we can create a "completely new REST API" by combining multiple APIs, doing the necessary preprocessing and translations in Google Apps Script."

more...
No comment yet.
Suggested by Jacob Jan Tuinstra
Scoop.it!

Building a table chart with Google Apps Script- Jacob Jan Tuinstra

Building a table chart with Google Apps Script- Jacob Jan Tuinstra | Google Apps Script | Scoop.it
This script uses the tableChart method, made available via the dashboard possibilities...
more...
No comment yet.
Scooped by Martin Hawksey
Scoop.it!

Collaborative Tools Project: The Day The Security Guy Dropped By <Google Apps Script Security By Tom Smith

Collaborative Tools Project: The Day The Security Guy Dropped By <Google Apps Script Security By Tom Smith | Google Apps Script | Scoop.it

"It's always a pleasure when Arthur the online security guy at York drops by for a cup of tea. Today he pointed out, kind of him to bother really, that....

 

When you run an AppsScript in a Google Spreadsheet, it is run by the ActiveUser i.e the person that is logged in and working with the spreadsheet. In order to run the AppsScript, which edits the spreadsheet, you need Edit permission on that spreadsheet.

 

Stay with me.

 

Because you've got Edit permission on the spreadsheet, the container for the AppsScript, you've also got Edit permission on the AppsScript. That means, that you ( the ActiveUser ) can edit the script to say... get a copy of all my Documents ( assignments etc ) and upload them to a homework cheating site over here... and do it from your actual email address. It could send rude messages from you, the ActiveUser."

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

Expand your reach with web apps - Google Apps Developer Blog

"Apps Script developers that wished to share their work with a larger audience have traditionally turned to the Script Gallery, which allows other users to copy and install the script into their own spreadsheets. While appropriate for custom functions and spreadsheet extensions, it didn't fit well when distributing more complex functionality and apps.


In this blog post we'll be highlighting a newer way to distribute your scripts: deploying them as a web app and publishing them to the Chrome Web Store"

more...
No comment yet.