Have you ever wondered how you can manage permissions of your Files and Folders (aka DocsList) in bulk using Apps Script? And at night, when you are about to go sleep, have you wondered if your script is failing? And you must have wished if your script could run a bit faster. If yes, then we have three really good pieces of news to share with you.
Today, we are enhancing features in DocsList Services, introducing Notification of failed events and increasing the performance of Apps Script when they use other Google services.
Enhancements to DocsList Services
DocsList Services in Google Apps Script provides a powerful API to manage user’s documents list - this week we’re adding functionality to modify file and folder permissions. We’ve added methods to Add and Remove permissions for both editing and viewing.
Why is this important? Two very interesting uses of this functionality are:
These new methods are very easy to implement as you only need to provide an array of Users or Email Addresses and you are done! For example:
Notification of Failed Events
Most of you love and use Triggers for periodic execution of your scripts. We have now gone a step further by allowing you to configure Notifications when your scripts fail. You can setup a periodic email notification which will aggregate failures events thrown by your scripts and email it back to you. This is a really cool feature which will let you sleep at night!.
Increased Performance in accessing other Google Services
The fun thing about Apps Script is that it is an easy way to integrate various Google services like Contacts, Calendar, DocsList and Sites. We have just made this integration a lot more fun. Performance in communicating to these various Google Services has been optimized so that your scripts that access these services can run faster. Services like DocsList can be executed up to 3x faster. A big thanks to the team for that!
Saurabh Gupta, Developer Relations, Google Apps Script
Today, we are enhancing features in DocsList Services, introducing Notification of failed events and increasing the performance of Apps Script when they use other Google services.
Enhancements to DocsList Services
DocsList Services in Google Apps Script provides a powerful API to manage user’s documents list - this week we’re adding functionality to modify file and folder permissions. We’ve added methods to Add and Remove permissions for both editing and viewing.
Why is this important? Two very interesting uses of this functionality are:
- Ability to automate changes to File permissions based on logic in your script.
- Ability to make file permission changes in bulk (since we needed to give a break to administrators!!).
These new methods are very easy to implement as you only need to provide an array of Users or Email Addresses and you are done! For example:
// Get all VIEWERS of a File or Folder
Folder myFolder = DocsList.getFolder("myFolder");
File myFile = myFolder.getFiles()[0];
User[] fileViewers = myFile.getViewers();
myFile.addEditor("myfriend@mydomain.com");
myFile.addViewer("myOtherFriend@mydomain.com");
// Similarly you can make permission changes in bulk
myFolder.addEditors(fileViewers);
myFolder.addViewer(fileViewers);
Notification of Failed Events
Most of you love and use Triggers for periodic execution of your scripts. We have now gone a step further by allowing you to configure Notifications when your scripts fail. You can setup a periodic email notification which will aggregate failures events thrown by your scripts and email it back to you. This is a really cool feature which will let you sleep at night!.
Increased Performance in accessing other Google Services
The fun thing about Apps Script is that it is an easy way to integrate various Google services like Contacts, Calendar, DocsList and Sites. We have just made this integration a lot more fun. Performance in communicating to these various Google Services has been optimized so that your scripts that access these services can run faster. Services like DocsList can be executed up to 3x faster. A big thanks to the team for that!
Saurabh Gupta, Developer Relations, Google Apps Script
Great news! Increased performance is much appreciated. Thank you!
ReplyDeleteThis is great. I have to test the Contacts API as I think this one has (had ?) real performance issues
ReplyDeleteI am using the Folder.addEditor() to add editors to a collection. However, these editors are not seeing the Collection under the "Collections shared with me" in the left navigation panel.
ReplyDeleteAny thoughts on how to get the Collection to show up?
asics shoes
ReplyDeletebeats headphones
michael kors bags
michael kors outlet
michael kors outlet clearance
nike trainers
air jordans
kobe 11
canada goose outlet
coach outlet store online
louboutin pas cher
kate spade outlet
cheap jordan shoes
ugg slippers
ralph lauren polo
michael kors uk
cheap jordan shoes
coach factory outlet
oakley sunglasses
coach outlet store online
nike running shoes
louis vuitton outlet
hollister clothing
nfl jerseys wholesale
adidas shoes
jordans
gucci outlet
ray ban sunglasses
louis vuitton
ugg boots
louis vuitton bags
coach factorty outlet
oakley outlet
true religion jeans
louis vuitton handbags
michael kors outlet online
2016324yuanyuan