Our Add-in has set triggers (ScriptApp.newTrigger('myFunction')) to identify on any calendar change so that we update meeting data(Title, Participants Email, Start and End date etc) back to our DB. The challenge we are facing is that the if a participant is accepting/declining/cancelling a single meeting or a series, part of series etc we receive notifications and that calendar event object does not have any object to identify its a trigger caused due to participant activity and in which case we dont need to do any action.
To explain a case -
- Organizer schedules a series for 4 instances and includes 2 participants.
- One participant cancels the meeting for last two events.
- We receive event that does not identify that its action from participant and end up updating. meeting as cancelled. (Ideally we should get the trigger only when Organizer cancelled).
There are objects in events to identify if its organizer or participant but these always return "self:true".
"creator":{
"self":true,
"email":"dev@******.com"
},
"organizer":{
"self":true,
"email":"dev@******.com"
},
Is there any way we either restrict to receive notifications ONLY when organizer does any calendar update?
OR
Any way to identify from the calendar event object that this trigger is caused due to participant action?