Just finished (for now) a small utility that can be useful if you have some shared calendars and want to be notified if someone has changed something without telling you.
Sergii Kauk's profile photoSerge Gabet's profile photoMartin Hawksey's profile photoSupport Deutschland's profile photo
Interesting use-case. A few notes: hardcoded spreadsheet id is a bit frustrating, usually SpreadsheetApp.getActiveSpreadsheet() does the job for Spreadsheet-attached scripts as well as Session.getEffectiveUser().getEmail() for e-mail address. After the initial run I got an empty e-mail. When just event time is modified, the script reports them as deleted.
Hi, thanks for reading with attention. I had to do so because this script runs mainly on a timer trigger and in this case there is no "active sheet" nor "active user"(other than the script owner) on the spreadsheet (and also it allows to choose where to send the notification email, not necessarily to the script owner)
The first empty mail is normal since it takes data from script properties and at first run script properties is empty ;-)
last comment about event being 'removed'  : that's right, the event in its first definition is removed it should appear in the new report though. I know change detection could be more detailed but in my use case (and in many other situation) this 'on/off' detection is quite sufficient.(That's also the reason to show some details on the report sheets : start time, duration, invitelist etc... a quick look from a human eye is often more accurate than a complicated algorithm ;-)
wow, this was a long comment... sorry about that !
No, getActiveSpreadsheet will always work in Spreadsheet-attached script like yours. And triggers are run on behalf of users who install them, so getEffectiveUsers works too.
Not a problem with a big comment. I wish there were more technical discussions in this community.
You're right, I'm getting to much used to 'pure ui' webapps... and forgot this elementary method. I updated the code and related instructions. Thanks for heads up ;-)
I kept the email definition for the reason I already mentioned.
for info : I added a french version of the same app... just follow the link on the site's page
Add a comment...