Google Calendar - New or Update Event source triggers when a user accepts an invite

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

Mike Wimsatt : Hi, I have a workflow that triggers off Google Calendar’s new-or-updated-event-instant, but it triggered each time someone “accepted” the event. I see the “sequence” number that the trigger uses to identify a new or updated event is coming through as 0 on all of them, although the created and updated times are minutes or hours apart. Since I trigger other events off new events I’m getting duplicate events all over the place when people reply to invitations. How do people generally handle this?

Dylan Sather (Pipedream) : I believe these might be considered “updates” from the perspective of Google Calendar. Are you interested in just triggering your workflow when a new event is created, and not when any updates are made?

If it helps, we have a New Events Only? flag that you can set to true if you’d like that trigger to run your workflow only on new events. Would that work?

Dylan Sather (Pipedream) : If you visit https://pipedream.com/sources and select your Google Calendar event source (your workflow trigger) from the list, click on the Configuration tab, and you’ll see this option on the right side of the page.

Mike Wimsatt : Sorry, I realize I didn’t mention this originally, but I have that set to true.

Mike Wimsatt : but the docs say this flag checks for the sequence number, and the sequence number coming through on these updates is 0, as if they’re new, not updates.

Dylan Sather (Pipedream) : ah I see, sorry I should have looked at the code myself, but I see that now, as well. And I’m seeing the same behavior you are after some tests (in addition to another bug). I raised a bug and we’ll get on this ASAP: [BUG] Google Calendar - New and Updated Event (Instant) fails to honor New Events only? flag · Issue #1267 · PipedreamHQ/pipedream · GitHub

would you mind taking a look at this?

Jay Vercellone : Sure!

Jay Vercellone : I can confirm that the sequence field does not reflect the new vs. updated status.
I changed the logic in this PR:

Jay Vercellone : There’s also a few changes to make the linter pass

Dylan Sather (Pipedream) : Thanks Jay, tested and approved

Dylan Sather (Pipedream) : would you mind creating this trigger again? Just click the x at the top-right of the trigger step, and select the same trigger from the menu. Let us know if the new trigger works OK for you

Mike Wimsatt : ok, i did some testing and it looks like the fix works for the situation I described. Thanks! I looked at the code, and that was roughly what I had in mind to fix it myself, but thanks for the quick turnaround! I love that I can just look at the code for these things and get an understanding for why something might be breaking!

Mike Wimsatt : I tested by copying my workflow, but can I replace the trigger in place for existing workflows without breaking subsequent steps?

Dylan Sather (Pipedream) : good to hear! Yes, if you click the x in the top-right of the trigger step, you’ll see an option to Select one of your existing sources in the trigger selection menu. Click that, and you should see the existing Google Calendar event source, which you can select as your workflow trigger. Let me know if that works.

2021-05-25 09.28.44.gif

Dylan Sather (Pipedream) : By the way, if you’re ever keen on fixing an issue in the future, or want to submit new components that solve a use case for you, have you seen our component development docs?