Best answer

How do I use Find Event (Google Calendar) action to check today's events?

  • 9 August 2022
  • 8 replies
  • 1326 views

Userlevel 1

I’m trying to create a workflow wherein my zap would check my Google Calendar to see if someone is on a leave, then send them a list of their events for the day via Slack if they’re not. Everything else works as expected except for my Find Event step. 

 

Leave events are named in a specific way that makes it easy to search for and all I’m actually pulling from this action is a true or false if there’s a match.

 

What I expect it to do:

  1. New day starts (has a field which provides today’s date)
  2. [Google Calendar - Find Event] Check the Google Calendar for events today with the event name “Vacation Leave”.
  3. PATH
    1. False
      1. Don’t send message on Slack.
    2. True
      1. Send message on Slack.

I’ve tried and tested everything. Everything works as intended except for the Find Event action (#2).

 

What I’m sure isn’t the problem:

  • Search term has to be an exact match. - I’ve already tried different Search Terms and I can predictably get the zap to make a match or not depending on what I set if it’s just the Search Term that I’m playing around with.

What I think is the problem:

  • Start Time - I just put 0:00 since all leaves are plotted as All Day events.
  • End Time - I leave this one empty.

I’ve noticed that matches would sometimes come from future events and not just “today”. I’ve tried looking for documentation or guides on what format is accepted by these fields but I couldn’t find any which is why I did the minimum on these fields.

 

Another thing that I think would be a problem is this scenario:

  • Leave event starts on Monday and ends on Friday.
    • Today is Tuesday. Will the Find Event action correctly read that there’s a leave today?
      • The reason I worry about this is because I think that the event would have its Start Time at Monday 0:00 which would make a match on Monday but not for any other day in the week.

 

Hopefully someone can make sense of all my thoughts and show me how to make this work.

icon

Best answer by Mohamed Fahadh 15 August 2022, 15:33

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.

8 replies

Userlevel 7
Badge +9

Hey there, @SSD Admin! What an awesome use case! Thanks for sharing the steps you’ve taken to troubleshoot and your thoughts thus far.

While I’m fresh out of ideas on what may be the best solution here, I am curious if the combined 🧠 power of the Community can surface anything for you. 

We have some super geniuses lurking around these parts and I’m hoping they have some ideas for us! 🤞🏽

Userlevel 1

Another thing I’d like to note is that I’m aware of a Google Calendar-Slack integration that forwards event reminders to Slack. However, I want to go by this solution so that I can add things or other reminders to the Slack message in the future should I wish to. Hopefully someone here can assist. Thanks!

Userlevel 4
Badge +6

Hey @SSD Admin. I don’t have a solid answer, but I can say that I have been tripped up by start/end times on all day events a few times, especially if I’m dealing with my time zone being different than a peer’s time zone.

I’m wondering if instead of having a wide open start/end time if you can limit it to a time range you know will be applicable for all day events (maybe 8-5?)

Userlevel 1

Hey @Jillian, that’s possible. However that will create more work for me especially if someone takes a long leave. It becomes even more burdensome if multiple people file for a long leaves at the same time.

Userlevel 1

Hello @SSD Admin. I did try this out myself. The find event in Google Calendar returns the earliest event. I do understand that this event might be in the future. One way you can possibly tackle this is to compare the current date and time with event’s start date time.

 

You can use the formatter step , and Compare dates. If your output has `same dates : true` then you can do next action accordingly.

 

 

I hope this helps you out!

Userlevel 7
Badge +9

Hey there, @SSD Admin! I wanted to stop in and see if @Mohamed Fahadh tips worked for ya?

Keep us posted! We’d love to know once you’re able to find a solution here. 🙂

Userlevel 1

Hey @Mohamed Fahadh! That’s a very interesting solution that gave me inspiration for a possible one. The issue with your idea as seen in your screenshots is that it won’t catch on-going events. As we can see, Tuesday is still part of the leave but the same dates field returns a false. The idea I’m working on in my head is to create a GSheet that collects event information then use formulas to check if “today” is within the start and end and find some way to get GSheets to tell Zapier that there’s a match. Anyway, thanks for the inspiration! It gave me an idea on how to proceed.

 

Hey @christina.d, the issue I’m struggling with now is on the GSheets end which is how to make sure the timezones match up with Zapier timezones. I got carried away with the inspiration which made me forget to respond here. 😅

Userlevel 7
Badge +9

Glad to hear @Mohamed Fahadh sparked some inspiration for ya. Feel free to share your end solution when you arrive at it! It sounds like it would be a valuable contribution. 

I’ll mark their response as the best one for now but that can definitely be updated! 🤗

Regarding the time zones, feel free to create a new topic for that! We’re happy to dig into it.