Best answer

Prevent duplicates when copying (updated) events between two calenders


Userlevel 1
Badge
  • Beginner
  • 19 replies

I use Zapier to copy events between a subscribed calendar (read only) and Google Calendar, using the “New or updated event”- and “Create detailed event”-zap.

 

Sometimes the subscribed calender updates an existing event. This causes my Zap to make a duplicate in the destination calender rather than updating the existing event. This is not what I want. I found another built in Zap, “Update Event” but I am not sure how to use it.

 

  1. I don’t know what to search for. UID is probably not the same in the source and destination calender. Title might be something that has changed (and may not be unique). Is there some smart solution to this problem?
  2. I am required to enter a start and end date for the search. This seems to be a good way to create a zap that easily breaks. I would prefer to not enter that but since I am forced to do it, can I enter something that means “from the start to the end of the calendar”?

 

I have read this question

which is similar to mine but the answers don’t address my issues.

 

Thank you

icon

Best answer by christina.d 7 June 2022, 20:26

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

15 replies

Userlevel 7
Badge +14

Hi @dbo 

Good question.

Try these Zap steps:

The Update Event step is used when an existing Event is found.

 

Userlevel 1
Badge

I can¨t find the zap in your middle step, “Find or Create Event”. I can only find Find Event and Create Detailed Event. Where is the “Find or Create”-zap?

 

 

 

 

 

Thank you

Userlevel 7
Badge +14

@dbo 

Choose Find Event and there will be a checkbox option to Create Event within.

Userlevel 1
Badge

I’m not following you now. I have checked that box but it still just says Find Event.

 

And what should I use to find the event in case it is updated? Something that is unique and constant.

 

What about this warning? Can you explain?

 

Thank you.

Userlevel 7
Badge +14

@dbo 

When the checkbox is checked, the step functions as a Find/Create Event step.

 

Remove Extra Fields

Be sure to read the description shown in the screenshot so you have context about what it’s warning you about.

Go ahead and remove the extra fields.

 

And what should I use to find the event in case it is updated? Something that is unique and constant.

Yes.

Userlevel 1
Badge

I don’t understand the warning text about the extra fields.

 

And what should I use to find the event in case it is updated? Something that is unique and constant.

Yes.

 

This wasn’t super helpful...What field can I use for searching in my use case?

Userlevel 7
Badge +14

@dbo 

The Extra Fields box warns that there are extra fields detected that aren’t supported and should be cleared out to avoid possible Zap errors.

 

Userlevel 7
Badge +14

@dbo 

 

And what should I use to find the event in case it is updated? Something that is unique and constant.

Yes.

 

This wasn’t super helpful...What field can I use for searching in my use case?

 

That will depend on your use case and what would be considered a unique value.

Often trial and error is the best way to determine what the right value to use is.

Userlevel 1
Badge

I have tried inserting the source event’s UID into the summary (in addition to the summary) and will try to search for that. But I really see no other solution since all other, regular and visible, fields could be changed.

I think the Google Calendar API supports “extended properties”. You should consider adding some

x-zapier-src-uid

or so in the created event. This should/could streamline the update zap a lot.

Userlevel 7
Badge +14

@dbo 

To clarify, I don’t work for Zapier.

Feature requests and feedback can be submitted via a ticket to Zapier Support: https://zapier.com/app/get-help

 

You may want to implement a Lookup Table via a GSheet.

Where all GCal Events are logged to a GSheet that includes the Event ID from both Calendars since that will be a unique value.

Then you don’t have to search for the Event, rather do a lookup for the Event ID and get the corresponding Event ID to use to update an Event.

Userlevel 3
Badge +4

Hey @dbo! I just wanted to pop in and see if you were able to get your Zap running correctly or if you still needed some help working through a solution? 🙂

Userlevel 1
Badge

Hey @dbo! I just wanted to pop in and see if you were able to get your Zap running correctly or if you still needed some help working through a solution? 🙂

No, I am stuck at the search step.

 

This is what I have done:

 

  1. When I copy an event from the source calendar (A) to the destination calendar (B) I add the ID and UID at the end of the event description (I think both should work fine but I am experimenting right now).
  2. I then created a zap with these steps
    1. New or Updated Event in GC
    2. Find Event in GC
    3. Update Event in GC

In (2) I search for the ID or UID (both seems to work) - but this is where I am stuck right now because I have to enter a Start/End Date & Time - but I don’t know that and don’t want to limit the search in time, I want to search everything. Why would you want to search using date/time if you search for a UID?

Besides, if you use one of the suggested “building blocks” (e.g., Event Begins) what data is actually used in the search? At this point in the process we don’t have any event details to use, do we?

 

I think I saw some reference to relative dates somewhere (e.g., “today - 99 years”) but I can’t find that now. Am I dreaming or do you know anything about that?

Userlevel 1
Badge

@dbo

 

Then you don’t have to search for the Event, rather do a lookup for the Event ID and get the corresponding Event ID to use to update an Event.

 

How do I search for the Event ID without entering a date range?

Userlevel 3
Badge +4

Hmm.. I’m curious as to how your Zap is configured. I believe if the data you are mapping to in your Zap is dynamic, this should work? What options do you have as a dropdown to map to in the step where you have to input a start date? I believe the reference to (today - 99 years) is an example to how you can format dates with formatter, I don’t know if that would be useful for this case. 

Completely separate train of thought, I wonder if there is a way to use a filter step to solve your issue of duplicating events by checking the created at date as stated in this article:

If older events in Google Calendar are updated, this can cause the Zap to trigger on them. When checking for events on Google Calendar, Zapier looks at the last updated date and gets any events updated in the last three days, regardless of when they were created.

To avoid this, you can add a Filter step, to check if the Created at date is after a certain date, such as the Zap's creation date, and avoid old events triggering the Zap.

I’m sure with enough brainstorming we can figure this out!🙂

Userlevel 7
Badge +9

Hey friends! 👋🏽 I wanted to pop in and summarize some of the replies here in case it’s useful for anyone stumbling across this. 🙃

To get us started Troy recommended using the Find/Create Event action:

 

Choose Find Event and there will be a checkbox option to Create Event within.

 

From there in order to find the proper event he suggests:
 

You may want to implement a Lookup Table via a GSheet.

Where all GCal Events are logged to a GSheet that includes the Event ID from both Calendars since that will be a unique value.

Then you don’t have to search for the Event, rather do a lookup for the Event ID and get the corresponding Event ID to use to update an Event.

 

We also had some fire tips from TamRazzleDazzle:

I believe if the data you are mapping to in your Zap is dynamic, this should work? What options do you have as a dropdown to map to in the step where you have to input a start date? I believe the reference to (today - 99 years) is an example to how you can format dates with formatter, I don’t know if that would be useful for this case. 

Completely separate train of thought, I wonder if there is a way to use a filter step to solve your issue of duplicating events by checking the created at date as stated in this article:

If older events in Google Calendar are updated, this can cause the Zap to trigger on them. When checking for events on Google Calendar, Zapier looks at the last updated date and gets any events updated in the last three days, regardless of when they were created.

To avoid this, you can add a Filter step, to check if the Created at date is after a certain date, such as the Zap's creation date, and avoid old events triggering the Zap.

I hope some of this is helpful and gets ya’ll pointed in the right direction!