I wrote a script in Google Apps Script, when I add an editor (a group here) to a Folder Class with email.
The problem it's this method send notification to everyone in this group, can I remove notifications ?
I wrote a script in Google Apps Script, when I add an editor (a group here) to a Folder Class with email.
The problem it's this method send notification to everyone in this group, can I remove notifications ?
Using the DriveApp, email notifications are always on and can not be changed. Google even has a Feature Request on their Issue Tracker requesting this - if you give it a star you can let them know more people want this feature.
Edit: The question Sourabh Choraria linked also has some great workarounds if you want to use the Drive Advanced Service or if you only need to share specific Docs or Sheets.
Thanks to Google Advanced Service enabled (Drive API), you can do that :
Drive.Permissions.insert(
{
'role': 'writer',
'type': 'user',
'value': 'user@email.com'
}, ClassFile.getId(),
{
'sendNotificationEmails': 'false'
});
To do this :
In the script editor, select Resources > Advanced Google services...
And enable Drive API :