What's the difference between the Google Calendar New Event and New or Updated Event (Instant) sources?

This topic was automatically generated from Slack. You can find the original thread here.

Raymond Camden : For the Google Calendar Event Source, can someone explain the difference between “New Event” and “New or Updated Event (Instant)”, also, does “updated” cover deleted? Basically, I want to fire an event for any CRUD on an event. Use case: Static web site that shows upcoming events. I want to rebuild the site when someone adds, edits, or deletes an event

Raymond Camden : In my testing, the new or updated one works as expected. I saw events for create, edit, and delete. I’d still like to know what the “Instant” implies. The Event Source has a schedule, it defaults to one hour, but can be configured, but does Instant mean the schedule doesn’t matter?

Dylan Sather (Pipedream) : “Instant” means the event source is tied to a webhook or another interface that delivers the event instantly. In this case Google Calendar actually requires we renew the webhook subscription every so often for them to keep sending events, and that’s where the timer comes in. We don’t have a way to hide that right now, but I’m updating the text of that timer to something like we show for Google Drive, to make its purpose more clear:

Dylan Sather (Pipedream) : I’m also adding a section of our event source docs to clarify what Instant means

Dylan Sather (Pipedream) : expect some better UX for event sources in the future, e.g. descriptions that clarify exactly how the event source works

Raymond Camden : Ok. so probably a schedule of like every 6 hours is way more than enough, right?

Dylan Sather (Pipedream) : that’s right, and I’ll actually modify the default. We set the current default before we capped users on invocations.

Dylan Sather (Pipedream) : let me try to confirm what the default expiry is, just to make sure

Dylan Sather (Pipedream) : I’m actually seeing a default expiration of a week. Just created a source and got the expiry 1607797798000 (Saturday, December 12, 2020 6:29:58 PM GMT)

Raymond Camden : cool, ill switch it to daily to be safe

Raymond Camden : related, and i filed a feature request for this, do you know if “Find Events” supports getting all events?

Dylan Sather (Pipedream) : it does. For example, to get all future events, just set timeMin to the ISO representation of now: Retrieve all future Google Calendar events - Pipedream

Raymond Camden : ok. i filed a feature request to just make it more obvious. find to me implied search. also - im slow

Dylan Sather (Pipedream) : I hear you. I think there’s value in having an action that maps perfectly to the API action so that, when reading the docs for that service, we’re not abstracting anything, which I think has the potential for confusion. That’s the current state of the action.

But I agree that we can have other actions that make the common cases simple. I’m publishing an action that gets at your use case

Dylan Sather (Pipedream) : but let me know if the workflow helps

Raymond Camden : i think you have a point too.

Dylan Sather (Pipedream) : it just sets timeMin and singleEvents to true (otherwise recurring events are bucketed into a single event)

Dylan Sather (Pipedream) : not sure what you want but that behavior isn’t obvious

Raymond Camden : for this particular use case (a blog post), the hypothetical site is an events site, so repeated events would need to be returned.

Raymond Camden : but if i can flip the boolean on that easily, then im good :wink: