Back in 2014, we introduced add-ons for Google Docs, Sheets, and Forms in developer preview. Since then, the developer community has built a wide variety of features to help millions of Docs, Sheets and Forms users become more productive. Over the last few months, we launched a number of developer-friendly features that made it easier to build, test, deploy and distribute add-ons. Some key capabilities include:
Ability to publish add-ons in Google Apps Marketplace
With these features under our belt, we are ready to graduate add-ons out of developer preview. Starting today, any developer can publish an add-on. To ensure users find the best tools for them, every new add-on will undergo a review for adherence to our guidelines before it’s available in the add-ons store.
Posted by Kalyan Reddy, Developer Programs Engineer
Originally posted on the Google Apps Developer blog
Apps Script includes many built-in Google services for major products like Gmail and Drive, and lately, we've been working to add other APIs that developers have been clamoring for as advanced Google services. Today, we are launching seven more advanced services, including:
Like all other advanced services in Apps Script, they must first be enabled before use. Once enabled, they are just as easy to use as built-in Apps Script services -- the editor provides autocomplete, and the authentication flow is handled automatically.
Here is a sample using the Apps Activity advanced service that shows how to get a list of users that have performed an action on a particular Google Drive file.
function getUsersActivity() {
var fileId = 'YOUR_FILE_ID_HERE';
var pageToken;
var users = {};
do {
var result = AppsActivity.Activities.list({
'drive.fileId': fileId,
'source': 'drive.google.com',
'pageToken': pageToken
});
var activities = result.activities;
for (var i = 0; i < activities.length; i++) {
var events = activities[i].singleEvents;
for (var j = 0; j < events.length; j++) {
var event = events[j];
users[event.user.name] = true;
}
}
pageToken = result.nextPageToken;
} while (pageToken);
Logger.log(Object.keys(users));
}
This function uses the AppsActivity.Activities.list() method, passing in the required parameters drive.fileId and source, and uses page tokens to get the full list of activities. The full list of parameters this method accepts can be found in the Apps Activity API's reference documentation.
Apps Script started out as a simple tool to let developers add new features to Google Apps, but it’s grown into a programming platform that thousands of professional coders use every day. We hear a couple common requests from developers when they’re building complex projects with Apps Script: they want a full-featured IDE, and they want to sync to external version-control systems like GitHub.
Today, we’re introducing support for Apps Script in the Google Plugin for Eclipse. You can now sync with your existing Apps Script files on Google Drive, edit them in Eclipse — offline, if necessary, and with all the benefits of autocomplete — then write your code back to Drive so you can run it in the cloud. Because the plugin stores a copy of each script in a local workspace, you can manage Apps Script projects with your favorite version-control system.
Getting started is easy:
Install Eclipse, if you don’t already use it. If you already have Eclipse, make sure it’s at least version 3.7 (Indigo) for either Java or Java EE.
In Eclipse, select Help > Eclipse Marketplace, then install the Google Plugin for Eclipse (or see our Getting Started guide for alternate installation instructions).
Click Sign in to Google in the bottom-right corner of Eclipse, then enter your username and password.
Select File > Import to transfer your projects into Eclipse. Whenever you’re online, the plugin will automatically sync your local edits with Google Drive.
Just in case you were wondering, the plugin uses the public Google Drive SDK to sync Apps Script files between your local file system and Google’s servers. We’ve previously covered the techniques it uses in our documentation on importing and exporting projects and in the recent episode of Apps Script Crash Course on Google Developers Live below.
Norman Cohen is a software engineer based in Google’s New York office. He works primarily on the Google Plugin for Eclipse, focusing on improving developer experience in the cloud.
Many people have been asking for a simple way to put Google Analytics data into a Google Spreadsheet. Once the data is inside a Google Spreadsheet, users can easily manipulate Google Analytics data, create new visualizations, and build internal dashboards.
So today we released a new integration that dramatically reduces the work required to put Google Analytics data into any Apps Script supported product, such as Google Docs, Sites, or Spreadsheets.
Here’s an example of Google Analytics data accessed through Apps Script and displayed in a Google Spreadsheet.
Custom API Dashboards - No Code Required
We know that a popular use case of this integration will be to create dashboards that automatically update. To make this easy to do, we’ve added a script to the Spreadsheets script gallery that handles all this work - no code required. The script is called Google Analytics Report Automation (Magic).
This script is a great template for starting your own project, and we’ve had many internal Google teams save hours of time using this tool. Here’s a video demoing how to build a dashboard using this script:
You can find this script by opening or creating a Google Spreadsheet, clicking Tools -> Script Gallery and searching for “analytics magic”.
Writing Your Own Script
Of course many developers will want to write their own code. With the new Analytics – Apps Script integration, you can request the total visitors, visits, and pageviews over time and put this data into a spreadsheet with just the following code:
// Get Data.
var results = Analytics.Data.Ga.get(
tableId,
startDate,
endDate,
'ga:visitors,ga:visits,ga:pageviews',
{‘dimensions’: ‘ga:date’});
// Output to spreadsheet.
var sheet = SpreadsheetApp.getActiveSpreadsheet().insertSheet();
sheet.getRange(2, 1, results.getRows().length, headerNames.length)
.setValues(results.getRows());
// Make Sandwich.
Are you ready to start building solutions using Google Analytics and Google Apps Script?
We’d love to hear new ways you use this integration to help manipulate, visualize and present data to solve business problems. To encourage you to try out this integration, we are giving out Google Analytics developer t-shirts to the first 15 developers to build a solution using both APIs.
To be eligible, you must publish your solution to either the Chrome Web Store or the Spreadsheets Script Gallery and include a description of a business problem the script solves. We’ll then collect these scripts and highlight the solutions in an upcoming blog post. After you publish your script, fill out this form to share what you’ve built.
We’re looking forward to seeing what you can do with this integration.
Nick Mihailovski is a Senior Developer Programs Engineer working on the Google Analytics API. In his spare time he likes to travel around the world.
Today at Google I/O, we announced many enhancements to Google Apps Script to help you build richer applications and share your apps with users. Apps Script began as a tool for helping users get more done with their Google spreadsheets. Over time, Apps Script has grown to handle much more. It's a platform to extend Google spreadsheets and Sites, and a convenient way to create web applications.
We launched script.google.com as a destination for Apps Script developers. You can now create scripts from script.google.com or from Google Drive. Plus, your projects are now stored in Google Drive, and you can share them just like a Google document or spreadsheet.
HtmlService can help you create beautiful interfaces using Apps Script. HtmlService allows you to create web apps using HTML, client-side JavaScript, and CSS. You can also use jQuery to build web apps. HtmlService uses Google Caja to ensure that the HTML content served by your web apps is saferfor you and your users.
We also launched a better way to store your application's data, ScriptDb. Every script now has an embedded JSON database. You no longer have to rely on a spreadsheet to store the data. Using ScriptDb, you can store a larger volume of data and search easily. We designed ScriptDb to be easy to use. It doesn't need connection strings or special passwords, and you can directly store and search your JavaScript objects without the need to convert them to a different format. You can learn more about ScriptDb on the Google Apps Script Developers page.
There are also now more options for deploying your web app. Your apps can now, with authorization, run as the user behind the keyboard, not just the script owner. This brings a new level of versatility to web apps built with Apps Script.
Finally, we wanted to make it easy to distribute your apps. You can nowpublish your apps in the Chrome Web Store. Register and package your app directly from the Publish menu in Google Apps Script. Then customize your listing from the Chrome Web Store and publish your app to the world.
Google Apps Script is a JavaScript cloud scripting language that provides easy ways to automate tasks across Google products and third party services. If you want to learn more about Google Apps Script, collaborate with other developers, and meet the Apps Script team, here’s your chance! We will be holding an Apps Script hackathon in Washington, DC on Wednesday, March 7 from 2pm - 8pm.
After we cover the basics of Apps Script, you can code along with us as we build a complete script, or you can bring your own ideas and get some help and guidance from the team. There will be food, power, and Apps Script experts available to help throughout the day. Just bring your laptop, ideas, enthusiasm, and basic knowledge of JavaScript. Check out out the details of the event and be sure to RSVP to let us know you’re coming.
Jan Kleinert is a Developer Programs Engineer based in NYC, focusing on helping developers get the most out of Google Apps Script. Prior to Apps Script, she worked on Commerce, helping merchants integrate with Google Checkout and on Chrome, helping developers build great web apps.
Two months ago we announced that a few of us from the Google Apps Developer Relations team would be going around EMEA to meet with developers and talk about Google Apps technologies. We have met great developers from Germany, France, Russia, Czech Republic, Egypt, Switzerland, Israel, and Spain during Google Developer Days, hackathons, developer conferences and GTUG meetings.
This year we are continuing the tour with a series of Google Apps Script hackathons taking place in Vienna, Milan, Madrid, Munich and Dublin over the next few months. These hackathons provide a fun and hands-on way to learn about Google Apps Script and a good opportunity to give us your feedback on this technology.
For more information about the tour and to register for these events, please visit the Google Apps EMEA Developer Tour website.
Nicolas Garnier joined Google’s Developer Relations team in 2008 and lives in Zurich. He is a Developer Advocate focusing on Google Apps and Web APIs. Before joining Google, Nicolas worked at Airbus and at the French Space Agency where he built web applications for scientific researchers.
This holiday season, the Google Prediction API Team is bringing you four presents and, thanks to the joys of cloud computing, no reindeer are required for delivery. Here’s what you’ve already received:
Faster on-ramp: We’ve made it easier to get started by enabling you to create an empty model (by sending a trainedmodels.insert request with no storageDataLocation specified) and add training data using the trainedmodels.update method. This change allows you to submit your model contents without needing to stage the data in Google Cloud Storage.
Improved updates: The algorithms used to implement model updates (adding additional data to existing models) have been modified to work faster than ever.
More classification algorithms: We’ve increased the number of classification algorithms used to build predictive models, resulting in across-the-board improvements in accuracy.
Integration with Google Apps Script: Prediction services are now available as part of Google Apps Script, which means you can integrate prediction services with Google Docs, Google Maps, Gmail, and other great Google products.
All of the above enhancements are supported by the current Prediction API version 1.4 so you can enjoy these features using the existing client libraries.
Happy Holidays from the Google Prediction API Team. We’re looking forward to bringing you more exciting features in 2012!
Marc Cohen is a member of Google’s Developer Relations Team in Seattle. When not teaching Python programming and listening to indie rock music, he enjoys using the Google Prediction API to peer into the future.
By Silvano Luciani, Developer Programs Engineer, AdSense API Team
Starting today, the AdSense Management API is available as part of AdSense Services in Google Apps Script. This means that you’ll be able to automate your AdSense reporting across Google products using a JavaScript cloud scripting language to do things like:
Create AdSense performance reports for your AdSense accounts in a Google spreadsheet.
Embed your scripts in a Google Sites page, for instance to import a chart.
Use triggers to schedule the execution of your scripts, for instance to periodically update the chart imported in the Google Sites page.
You can start using the service by checking out the reference documentation, which also contains some sample scripts, and by reading this tutorial, which implements the use cases mentioned above.
Based in London, Silvano Luciani joined Google in 2011 to make the AdSense API developers happier people. Before that, he has worked in Finland, Italy, Spain and the UK, writing web based configuration management tools for ISPs, social networks, web based training materials, e-commerce apps and more. He has recently discovered that he loves charts, and has finally started to play the drums in the London’s office music room. If you can call what he does "playing the drums".
By Jacob Moshenko and Gustavo Moura, Software Engineers
In January of this year we launched BigQuery integration with Google Apps Script. What we didn’t mention was that we were building this on top of our Google APIs Discovery Service. Thanks to the ease and flexibility of writing clients based on this API, today we’re announcing integration with three more APIs, and revamping our BigQuery support.
As of now, we have also integrated the Tasks API, Prediction API, and URL Shortener API in addition to the BigQuery API. You can now include these APIs in your scripts, apps, and sites pages. As with other Apps Script services, we handle all of the server communications as well as authorization, which makes this a great way to build mashups and workflows using our APIs.
To get started, simply enable the APIs you’re interested in from the "Use Google API services" menu in the script editor.
Using this feature will prompt you to save your script. Once you have done so, the Google APIs Services dialog will appear and you can choose which APIs to use, which versions to use, and what name to use when referencing them from your scripts.
After you complete this step, the API methods will be automatically populated as you type using the standard Apps Script autocomplete mechanism. For detailed information about each API, visit our reference documentation. We have also created a tutorial with a simple, fun application to help you get started using scripts.
As we iron out this new technology and listen to your feedback we plan to aggressively integrate even more APIs. If you have any questions or experience any problems let us know on our support forum.
Jacob Moshenko is a Software Engineer working on the Google APIs developer experience. He believes that Google APIs should be easy to use, especially from Google platforms.
Gustavo Moura has been a Software Engineer at Google since 2007. He has been part of the Google Docs team since 2009. Prior to that, he worked on AdWords.
Google Apps Script lets you automate and extend Google Apps. Using Apps Script, businesses can build efficient solutions to meet their requirements such as:
Join us on August 18th for the Google Apps Script Hackathon. If your organization uses Google Apps and you want to explore how you can use Google Apps Script to create custom functions or automate repetitive tasks, then this hackathon is a perfect opportunity to learn. Google engineers will be available to answer your questions and help you learn Apps Script throughout the day’s agenda. We’ll provide food, refreshments, and experts to help you learn to use Apps Script and write your own scripts. Just bring your laptop, ideas, and enthusiasm to complete the mix. We hope to see you there!
What: Apps Script Hackathon Date: Thursday, August 18th, 2011 Time: 2pm to 7pm EST Where: 76 9th Avenue, New York, NY Register: Space is limited, register here.
For those who cannot attend in person, we invite you to try out a number of self-paced tutorials on the Apps Script documentation site.
Google Apps Script is a JavaScript cloud scripting language that provides easy ways to automate tasks across Google products and third party services. If you want to learn more about Google Apps Script and meet the Apps Script team, here’s your chance! We will be holding an Apps Script hackathon in Mountain View, CA on Thursday, September 23 from 2pm - 8pm.
After we cover the basics of Apps Script, you can code along with us as we build a complete script, or you can bring your own ideas and get some help and guidance from the team. There will be food, power, and Apps Script experts available to help throughout the day. Just bring your laptop, ideas, enthusiasm, and basic knowledge of JavaScript. Check out out the details of the event and be sure to RSVP to let us know you’re coming!