Question

How do I query for records within specific time range in a Zapier table?

  • 3 October 2023
  • 2 replies
  • 113 views

I would like to be able to query a zapier table to see if there are multiple records where there datetime field is between Midnight monday morning and midnight the following morning.  Is it possible to query a zapier table like this?


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

2 replies

Userlevel 7
Badge +11

Hello and welcome to the Community, @cagbelt!

It’s possible to filter a list of records to only show records that contain date/times that are before and after certain date and time values. Is that what you’re after? If so, you can set up a custom view and use filter rules to filter out the records as desired. For example:
4289735996a3bf828554fb33d1cc37c1.png

You can find out more about creating views here: Create views in Zapier Tables. And you can learn more about the available rules for Date/time field types here: Rules for the Date field type
 
Hope that helps to get you started. Please do keep us in the loop on how you get on with this! 🙂

Thank you for your response.  The scenario is that any one client is allowed to make one appointment per week in Calendly.  So if an appointment is made on a Wednesday, for example, then that client will have used up their appointment allotment for that Monday through Sunday period and the soonest they could have another appointment would be the following Monday.  To keep track of when each appointment is made for each client I thought I could add a record to a zapier table including the clients email address, appointment DateTime and cancel_url.  So whenever a new appointment comes in I have to check the table to see if it already has an appointment in that same Monday through Sunday period.  Since I don’t know ahead of time which week that appointment will be in, I need to create my search criteria on the fly.  I don’t see a way to create a filter on the fly for a zapier table.  Is there a way to do that?  Is there a better approach to this?

 

Another detail is that if I do find that another appointment was already scheduled during that time period then I will need to automatically cancel the appointment that was just made.  I believe I can do this using the cancel_url in the original appointment information.