1

I wrote a script in Google Apps Script, when I add an editor (a group here) to a Folder Class with email.

Used method image

The problem it's this method send notification to everyone in this group, can I remove notifications ?

TheMaster
  • 45,448
  • 6
  • 62
  • 85
  • 3
    Possible duplicate of [Share a Drive document without notifying user with Google Apps Script](https://stackoverflow.com/questions/21189936/share-a-drive-document-without-notifying-user-with-google-apps-script) – Sourabh Choraria Sep 30 '19 at 15:07

2 Answers2

0

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.

Rafa Guillermo
  • 14,474
  • 3
  • 18
  • 54
0

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 :

Enabling Drive API Advanced Service