-
-
Save JavierCane/28f7307ceeaf6464431c1418b598a817 to your computer and use it in GitHub Desktop.
Google Spreadsheet script that lists all the shared documents inside a specified folder and all its subfolders recursively. Skips out the documents shared internally (with specified email addresses)
80avin
commented
Jan 22, 2022
Thanks. I'd add in line 43 another line to allow filtering by domain:
function filterInternalEditors(file) {
const internalEmails = [
"@gmail.com",
"[email protected]"
];
const editorEmails = file.getEditors().map(e => e.getEmail());
return editorEmails.filter(editorEmail =>
!internalEmails.includes(editorEmail) &&
!internalEmails.includes(editorEmail.slice(editorEmail.indexOf('@')))); //Line added
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment