background preloader

Google Application Script

Facebook Twitter

Google Apps Script. OAuthApp - Google Script Examples. This Library makes it easy to use OAuth.

OAuthApp - Google Script Examples

It is also flexible in that you can specify any google service names and an optional scope. This is only required if your API is not yet in our list. Project Key: MM5uQxqjwkMiuJW2zE50SgUF7jOZt2NQ8 InstallingUsing Installing the OAuth Library 1. 2. Project Key: MM5uQxqjwkMiuJW2zE50SgUF7jOZt2NQ8 3. *Note that the Identifier is how you call the library. Clicking the blue "Title" link will bring up the documentation window. 4. Using the Library The .getAuth method takes an apiName as its argument from the list below. *Your API not listed? In this example you are going to call on the getAuth(apiName) method. Connect to Google+ function gPlusMe(){ var options = Oauthapp.getAuth('gplus'); var API_KEY = '<YOUR_API_KEY>'; var result = UrlFetchApp.fetch(" options); var plusObject = Utilities.jsonParse(result.getContentText()); Logger.log(plusObject.displayName); //returns your Name Method: getAuth(apiName, optUserScope)

Apps Script. Apps Script Overview - Google Apps Script. Google Apps Script is a rapid application development platform that makes it fast and easy to create business applications that integrate with Google Workspace.

Apps Script Overview - Google Apps Script

You write code in modern JavaScript and have access to built-in libraries for favorite Google Workspace applications like Gmail, Calendar, Drive, and more. There's nothing to install—we give you a code editor right in your browser, and your scripts run on Google's servers. If you're new to JavaScript, Codecademy offers a number of JavaScript courses. (Note that these courses weren't developed by and aren't associated with Google.) What can Apps Script do? Apps Script is versatile. Your first script Build and run a simple standalone script that creates a Google Doc and emails you a link to it. Set it up To build the script, follow the steps below. Try it out To execute the script, follow the steps below. Learn more To continue learning about Apps Script, take a look at the following resources: Apps Script Tutorial.

Reference

Screenscraping With Google Spreadsheets App Script and the =importHTML Formula. Exciting news: Google Apps script is now available for all Google spreadsheet users…, so it seems I was timely in starting to get to grips with playing with this stuff…;-) So what can we do with Google Apps Script?

Screenscraping With Google Spreadsheets App Script and the =importHTML Formula

I’ve been posting a few ideas already, but here’s something I was working on last night – a script that automates table screenscraping using the Google spreadsheet =importHTML() formula. Here’s the setting: Lichfield council lists details of the last round of council elections on a summary results page: and a set of individual pages detailing comprehensive results from each ward (example). What I wanted was a big table listing all the results by ward. It’s easy enough to pull these results into a Google Spreadsheet using the =importHTML(“URL”,”table”,N) formula (where N is the number of the table in the page), but pulling results in for all 26 wards and then processing them separately would be laborious, so here’s what I did… Like this: Like Loading...