Best answer

Google Calendar Events - Zaps breaks if it can't find the event

  • 3 May 2023
  • 3 replies
  • 107 views

Userlevel 1

I’m using an API to pull back a simple list of events, there are three options

  1. Event is already on the calender, I want to find and update
  2. Event doesn’t exist I need to create it
  3. Event has been canceled, I want to find it a delete it

However, if use the “Find Google Event” function, if it doesn’t find the event. I’m searching on IDs that I am putting into the event name, the whole zaps just breaks, there is no way to move on. 

 

 

icon

Best answer by SamB 3 May 2023, 12:49

View original

3 replies

Userlevel 7
Badge +11

Hi there @oasis_seb


If you want the Zap to continue past that Find Event action if no event is found you’d want to set the Should this step be considered a “success” when nothing is found? option to Yes:
b08a1500ccb364815b7625b91bed418d.png

Or alternatively, enable the Create Google Calendar Event if it doesn’t exist yet? option to allow it to create an event if one isn’t found:
692cbed3d5eee43061792f8846e1c981.png

Either way, that will output a field called either _zap_search_was_found_status or _zap_data_was_found (when creating events that don’t exist option is enabled) which will be false if nothing is found and true if an existing event is found. 

I also wanted to note that it appears that it isn’t able to find canceled events: 
c85cc4692187c0b4fa897d47889f27c4.png

So, if it’s a canceled event then it will never be able to find the event. In which case it may be worth creating a record of each event in spreadsheet that contains the details for the event like it’s ID and whether it’s canceled or not. Then instead of using the Find Event (Google Calendar) action you’d use a Lookup Spreadsheet Row (Google Sheets) action to search for the event to see if it’s there then carry out the necessary actions in your Zaps accordingly.

Do you think that approach could work?

Userlevel 1

This is so helpful. Thank you so much!!!

Userlevel 7
Badge +9

Stoked to hear this did the trick for you! Thanks for keeping us in the loop. 🤗

Reply