- Please make sure to edit the code below for your environment.
- Large templates take longer to copy
- Google limits the time a script can run to five minutes.
- Updated code to replace deprecated UserManager with AdminDirectory. You need to turn on Admin Directory API under Resources > Advanced Google services... Then click the "Google Developers Console" and turn on the Admin SDK
- It handles errors much better. If there is an error, instead of "Success!", it enters the error into the second column and keeps on going.
- It keeps track of how long it's running and gracefully ends if it approaches the maximum execution time. It creates a trigger to restart the script, so now you won't need to manually restart it.
- I added more comments to help folks understand what the code does.
- Here's an example of the template we pushed out: https://sites.google.com/a/veriapt.com/portfolio-example/