This is the gatsby-styled-blog-starter demo site. To download the code and get some instructions visit the Github repository . To be informed about updates follow @greglobinski

Sharable Link Trigger

I wanted to demonstrate how to change document properties on a trigger

October 11, 2017

Sometimes you want to share a document with an entire class and let everyone have edit permissions. However, what if you want to revoke those permissions at a specific time? Easy as pie with just a few lines of code.

My friend Gretchen Orwig suggested this project and luckily I was able to write it pretty quickly. Just open the script editor in any document that you want to set the triggering system in. Then just copy in the code below and create a project trigger as in my video!

function removeSharing() {
  var id = SlidesApp.getActivePresentation().getId();
  var file = DriveApp.getFileById(id);

  file.setSharing(DriveApp.Access.DOMAIN_WITH_LINK, DriveApp.Permission.VIEW);

Let me know on twitter what you think! Do you have any ideas for ways to incorporate code into your G Suite for Edu projects? Share them with us!


jordan rhea I started as a teacher and taught myself to code with Python and JavaScript. Now I am passionate about sharing code and strategies to make teachers (and other G Suite users) as effective as possible with technology.

© jordan rhea 2018