Calendar triggers fire when a user's calendar events are updated (created, edited, or deleted).
These triggers do not tell you which event changed or how it changed. Instead, they indicate that your code needs to do an incremental sync operation to pick up recent changes to the calendar. For a full description of this procedure, see the Synchronizing resources guide for the Calendar API.
End Quote
I have not used either the trigger or the API Watch. I don't see anything in the documentation that explains what the API watch provides for information.--
You received this message because you are subscribed to a topic in the Google Groups "Google Apps Script Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-script-community/1ZAXsK4Pkls/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-script-community+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/943cad65-c0a7-4758-8f27-6948c485cfb7n%40googlegroups.com.
To unsubscribe from this group and all its topics, send an email to google-apps-script-c...@googlegroups.com.
My guess would be that they store some metadata on calendar events using the above syncing method and then internally trigger tasks based on when those events start or end.Shouldn't be too difficult to implement. I've worked with using syncTokens to keep a local copy of some information in a users Google Calendar and it didn't take much to set it up. Happy to help out if you want to go this route.
On Friday, April 30, 2021 at 6:59:36 PM UTC+2 aj.a...@gmail.com wrote:
That's a good question about how Zapier is able to do it if the API doesn't provide the means to.Did you look at the documentation for synchronizing client and server calendar data?If both the calendar at Google and the setting somewhere else is in sync,then I believe that they'd have the same sync token.But if the tokens are different, then your code can request all the updates since the token that you have.I've never used this, so I'm just guessing after scanning the docs very quickly.The documentation doesn't even explain what the data in the incremental changes includes or what format it's in.So, I guess you learn it by trial and error.Zapier could be keeping their own databases of your calendar data in order to sync it that way.On Friday, April 30, 2021 at 12:43:48 PM UTC-4 kevin.ra...@gmail.com wrote:
Hey folksthanks for your answer. Your answers are definitely useful. But from the doc I read, there is nothing to be notified when an event is done. Not even the watch API does that, so I'm really curious how they implemented that at Zapier.Anything I missed?Kevin
Kévin
To unsubscribe from this group and all its topics, send an email to google-apps-script-community+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/ed0d2bef-9201-4710-8a8b-a56a1209ad86n%40googlegroups.com.

Hey Joshua,Thanks for your answer! Ok got it, it was what I suspected, as the Google Calendar API didn't offer that.As I started to code not long ago, I finished a bootcamp, I still have some struggle to understand the Google API. I successfully implemented a Google OAuth Sign-in and it was pretty painful!Right now I'm exploring what I could potentially implement for my new side project, I will come back to you in the next couple of days if I need help.Kevin
Kévin
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/ed0d2bef-9201-4710-8a8b-a56a1209ad86n%40googlegroups.com.
Basically, there doesn't seem to be a way to do this without storing the information about the events.
Hi Kevin,Great to hear that you have recently got into developing and are working on some side projects! Congratulations on completing the Sign-In flow, that can be quite challenging with all of the domain-specific authentication jargon.I can't quite decipher that answer, but here is what I think the engineer is saying:Zapier store a Zapier Event ID for each Google Calendar event that is a combination of the Google Event ID, the start time and the end time of the event. An endpoint then watches for changes.On receipt of a change, it requests the events and generates Zapier IDs for them, and checks those IDs against those currently stored. If there is a new ID present, that means there has either been a new event, or an event has changed start or end time.I don't think this is exactly what you want, given you want notifications when events start/end, rather than when their start/end is changed. Basically, there doesn't seem to be a way to do this without storing the information about the events.Let me know if I can explain all that better!
On Tuesday, May 4, 2021 at 9:28:53 AM UTC+2 kevin.ra...@gmail.com wrote:
Hi Joshua and Alan,I briefly discussed with an engineer from Zapier. Here his answer.One thing I'm not sure I follow, what does it mean when a new eventID is triggered? Is it inside Google Calendar they put a eventID:STARTED?Do they save the google calendar event somewhere?
Kévin
To unsubscribe from this group and all its topics, send an email to google-apps-script-community+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/ed0d2bef-9201-4710-8a8b-a56a1209ad86n%40googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "Google Apps Script Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-script-community/1ZAXsK4Pkls/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-script-community+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/8cf0210c-b0a6-4aa8-8ac3-30c59907874en%40googlegroups.com.

Basically, there doesn't seem to be a way to do this without storing the information about the events.What does it mean exactly storing the information? Do you mean they potentially save the data in mongoDB for example?
Kévin
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/ed0d2bef-9201-4710-8a8b-a56a1209ad86n%40googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "Google Apps Script Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-script-community/1ZAXsK4Pkls/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/8cf0210c-b0a6-4aa8-8ac3-30c59907874en%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/ed0d2bef-9201-4710-8a8b-a56a1209ad86n%40googlegroups.com.
--You received this message because you are subscribed to a topic in the Google Groups "Google Apps Script Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-script-community/1ZAXsK4Pkls/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/8cf0210c-b0a6-4aa8-8ac3-30c59907874en%40googlegroups.com.
If it is the response from the Calendar API it should contain an id field which refers to the events unique ID.
Hi Kévin,is this the response from the Google Calendar API or from a Zapier API?If it is the response from the Calendar API it should contain an id field which refers to the events unique ID.
On Thursday, May 6, 2021 at 9:01:01 PM UTC+2 kevin.ra...@gmail.com wrote:
I've done an attempt to see what I receive (from results.data). Where is the eventId? should I use etag as eventId?
Kévin
To unsubscribe from this group and all its topics, send an email to google-apps-script-community+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/ed0d2bef-9201-4710-8a8b-a56a1209ad86n%40googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "Google Apps Script Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-script-community/1ZAXsK4Pkls/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-script-community+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/8cf0210c-b0a6-4aa8-8ac3-30c59907874en%40googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "Google Apps Script Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-script-community/1ZAXsK4Pkls/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-script-community+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/137761de-13d3-4b3f-a3d4-72e870d2e0e6n%40googlegroups.com.
Precisely. I can't think of a solution where you don't store the event id's and their start/end times in a database, you can then use those to trigger some code to run at the start/end of the event.
Precisely. I can't think of a solution where you don't store the event id's and their start/end times in a database, you can then use those to trigger some code to run at the start/end of the event.I hope it goes well!
On Thursday, May 6, 2021 at 7:26:41 PM UTC+2 kevin.ra...@gmail.com wrote:
Basically, there doesn't seem to be a way to do this without storing the information about the events.
What does it mean exactly storing the information? Do you mean they potentially save the data in mongoDB for example?
Kévin
To unsubscribe from this group and all its topics, send an email to google-apps-script-community+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/ed0d2bef-9201-4710-8a8b-a56a1209ad86n%40googlegroups.com.--You received this message because you are subscribed to a topic in the Google Groups "Google Apps Script Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-script-community/1ZAXsK4Pkls/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-script-community+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/8cf0210c-b0a6-4aa8-8ac3-30c59907874en%40googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "Google Apps Script Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-script-community/1ZAXsK4Pkls/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-script-community+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/9151a018-55f2-4f2a-9c00-1f327e4184e8n%40googlegroups.com.

Precisely. I can't think of a solution where you don't store the event id's and their start/end times in a database, you can then use those to trigger some code to run at the start/end of the event.
Wow that's really interesting, I thought they only used the google calendar API. I'm less confortable to save users data! But let's try just to learn more things :)
Kévin