Test Excel export: Excel export
https://europe-west1-jobelhome-test.cloudfunctions.net/exportData?checkInFrom=2022-10-13&checkInUntil=2023-01-01
Defaults:
checkInFrom: last 31 days
checkInUntil: today
This Cloud Function downloads all the bookings from the last 31 days.
It exports "channelRef", "guestFirstName", "guestName", "guestEmail".
This Cloud Function downloads all the data from Beds24 that has been modified since the lastRefreshedTime data that is in the configurations Firestore collection.
This Cloud Function redirects the user to the registration page frontend with all the neccessary data in the URL compressed.
A link leading to this function is sent as an email. This email is triggered by the Beds24 platform. The Auto Action is called when it has the registered string on it. This conditioned is not met when the Auto Action is first called, so it has to be allowed to be repeated. I set it to be repeated until after 999 days of the booking time, this was the maximum time.
The function checks whether the guest have already registered, whether it has already past check in date etc.
This function is called after the registration frontend. It checks whether the form was filled in correctly, whether the guest has already registered etc. If everything is in order it saves the data into the database. If an error was thrown it either redirects or displays it on frontend. If it was successful it redirects to a success page.
It also saves a registered string into the booking in Beds24. Furthermore it sends a success message into the Google Chat group that is in the configurations Firestore collection.
It calls a Firestore REST method, which creates a backup of the database, the file is saved in the Google Cloud Storage. This can be called by the Google Scheduler, by migration or manually on Postman.
This function is called on the beginning of every deployment, it checks whether there is a new migration version, if yes then executes it.