简体   繁体   中英

GAS: trigger email whenever file is shared

I had been hoping to allow some editors to share a sheet, and other editors not be allowed to share. It looks like the 'editors can/can't share' feature applies to all editors and can't be individualized. As a 2nd best solution, I'm wondering if I can at least get an email notification when the document is shared so I can keep an eye on access. Is there a way to trigger an email when a file is shared by anyone? Like 'onOpen' but for sharing.

This should be possible with the Push Notifications API of Google Drive. See this link for details.

  • This answer originally proposed by @Amit Agarwal

Please select this answer so that we can use it in future reference to this question because getting the moderators to change it is impossible. I guess they can't change things just because they happen to be wrong.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM