Repeat Time Slots

Hello :wave:,

I currently have have a scheduling app which allows admins to create time slots and users to book the slots.
Each time slot is a row with a date column and a time column.
At the moment the admin has to manually create every slot. Is it possible to create slots with a repeat function, i.e repeat weekly, daily etc.

I wondered if anyone has already done something similar or has any ideas?

Thanks.

No easy way to do this purely with Glide.
I think the best approach would be to send a Webhook to either Integromat (Make) or Zapier, and have it insert the appropriate number of rows.

Thanks Darren

Do you use Google Sheets or Glide Tables as backend? I might line out some steps for you if I can know more about your data structure.

Hi ThinhDinh,
I’m using Glide Tables for this.

If you’re on Pro, I assume you can use the API to do something like this:

  • Connect the app to a Sheet to store your “template” slots.

The template slots can look something like this.

Day | Offset Days | Start Hour | End Hour
Monday | 0 | 07:00 AM | 09:00 AM
Tuesday | 1 | 08:00 AM | 10:00 AM
Wednesday | 2 | 03:00 PM | 05:00 PM

The Offset Date here is what I think will be crucial, since I imagine you can run this scenario every Monday to populate the slots for the whole week. The offset is calculated based on the difference in days compared to Monday.

Then, in Make, you add the steps like this:

  • Search Sheet: Search the Sheet above for rows that have the Day column “exists”.
  • HTTP Request: Add a HTTP call for each row the scenario finds to write a new row to your Slots table, with the “day” column taking a date formula like below.

In our case, it would be addDays(now; offset days).

The start hour and end hour can be written as is.

1 Like