Forum Academy Marketplace Showcase Pricing Features

Schedule API workflow on a list to detect when data changes

I’m building a property booking app similar to Airbnb. To ensure calendar’s stay in sync I need to create an auto updating master list in ical which shows all booked dates and all blocked dates (basically everything that makes a property unavailable to book on another platform)

Where I’m struggling is creating a system that automatically detects when a confirmed booking is created or modified and or when a user blocks some dates manually (for renovations etc)

I believe I need to somehow create a trigger that detects when a confirmed booking is added or deleted from the database and whether a blocked date is adder or deleted from the database.

Then I need to create a new data type which includes all of the most up to date confirmed bookings as individual entries and all of the blocked dates also as individual entries.

I believe to do this I should be looking at running an API workflow on the 2 lists (bookings & blocked dates) and creating the master list of ALL unavailable dates.

What would be the best way to approach this? I’m currently having issues with the most basic attempt at running a workflow on a list and I can’t seem to add two lists to a third master list prompted by a trigger of a change in the database. I can’t seem to find any advice or videos that explain how to do this.

It looks a bit like this in my database I have confirmed bookings

confirmed booking date a
confirmed booking date b
confirmed booking date c

I also have blocked dates

blocked unavailable date a
blocked unavailable date b

I would like to create a master list that would look like this. This master list is turned into an ical format so it is readable by booking com and airbnb etc so it blocks out those dates on other platforms

confirmed booking date a
confirmed booking date b
confirmed booking date c
blocked unavailable date a
blocked unavailable date b

Then if booking date b was cancelled by a host or guest it would automatically recompile the master list to look like this:

confirmed booking date a
confirmed booking date c
blocked unavailable date a
blocked unavailable date b

Thereby once again opening up that date to be booked on my or any other platform.
Does that make sense? How would you guys approach this?