The following Google Apps Script tool allows you to quickly append new permissions to existing folders within Google/Shared drive. This is quite a niche tool so it is anticipated you would already have a Google Sheet of folder IDs/URLs, though there is the option to select an existing Drive folder of folders and automatically bring them into this tool.
This tool is a modified version of the Append Drive files permissions tool.
By inserting email addresses using a comma-and-space format you can optionally select to send a notification email to the new user(s).
You can continue to append further rows to the Google Sheet as existing ones will be skipped once the ‘Status’ column has automatically been marked as ‘Completed’. Alternatively you can clear the Sheet each time for a fresh start.
Quickly append new folder permissions via a Google Sheet |
Instructions
- Open the relevant Google Sheet file and then go to “File” and select “Make a copy”, then choose a suitable location. This will make a copy of the tool in your own Google Drive.
- Start to complete the relevant columns in the Google Sheet. You do not need to add all folders at this point but you should ensure you complete the required information for any rows that you do start.
- Folder ID or URL - required, unless using the 'Select a folder of folders' option from the ‘Admin’ menu. Do not convert to a Smart Chip.
- Folder Name - unless using the ‘Select a folder of folders’ option from the ‘Admin’ menu, please use the ‘Get folder names’ option to scan through your existing IDs/URLs and automatically populate their name.
- Manager - optional - this is only for the root of a Shared drive, it is not for a folder in a Shared drive. It is possible to enter more than one email address here, as long as you separate each one by a comma and a space. For example: john.smith@york.ac.uk, jane.doe@york.ac.uk, joe.bloggs@york.ac.uk
- Content Manager - optional - this is only for a folder in a Shared drive, it is not for a folder in My drive. It is possible to enter more than one email address here, as long as you separate each one by a comma and a space. For example: john.smith@york.ac.uk, jane.doe@york.ac.uk, joe.bloggs@york.ac.uk
- Contributor / Editor | Commenter | Viewer - optional. It is possible to enter more than one email address here, as long as you separate each one by a comma and a space. For example: john.smith@york.ac.uk, jane.doe@york.ac.uk, joe.bloggs@york.ac.uk
- Send Email Notification - optional - defaults to ‘No’ if left blank. Uses the standard automated Google email for when an item is shared.
- Status - will be updated automatically.
- Notes - optional - just a column for you if you wish to add some information.
- If you wish to append further Columns from ‘K’ onwards then you may.
- Select a folder of folders - use this option if you do not have an existing list of folder IDs/URLs from another Google Sheet to paste in. This will allow you to collate a Google Drive folder of folders (they must be all at one level i.e. the tool will not iterate through sub-folders of folders).
- Click the ‘Admin’ option from the menu bar at the top and then ‘Select a folder of folders’. Read the information in the dialogue box carefully and click ‘Yes’ to proceed.
- Search for your Google Drive folder by entering its name into the search bar at the top left. Click once to highlight it then click the ‘Select’ button. Be patient at this point as there may be a delay whilst all of your folders are collated into the Google Sheet and the pop-up remains on-screen.
- You can now complete the information in the Google Sheet as per Step 2 above, ignoring columns A and B.
- Append folder permissions.
- Once you have completed the Google Sheet click the ‘Admin’ option from the menu bar at the top and then ‘Append folder permissions’.
- This will now automatically loop through each row and append permissions. The ‘Status’ column will be updated for you. This column also serves as a way of skipping rows should you wish to append further folders in future - so unless it is blank the said row will be ignored. Whilst this is running please leave the Google Sheet open, but you can continue to work on other tasks should you wish. The process will not slow down your PC or internet connection.
- A pop-up message will appear in the Google Sheet at the end to inform you when it has completed.
Caveats
- Fixed columns/rows
- You must not add/delete/move any of the blue columns (A to J) otherwise the tool will break. Nor should you try to insert a new row above the current row 3. You absolutely can add further columns/data from K onwards if you wish.
- Smart Chips
- Do not accept the automated Google prompt to convert your File URLs (Column A) into a Smart Chip (this is usually by clicking on the prompt or by pressing the Tab key). Whilst this is useful and looks nicer in other circumstances, it will break the automation here unfortunately as Google have not made Apps Script compatible with them.
Download
Append Drive folder permissions Tool download (please use 'File' > 'Make a copy' for your own version).
No comments:
Post a Comment