A cron job keeps ninety days of bookings in sync
There is a cron endpoint that pulls my Google Calendar, matches attendees to client emails in the database, and upserts booking records. Ninety days back, thirty days ahead. It runs on a schedule, authenticated with a bearer token so nobody else can trigger it. Every calendar event with a client attendee becomes a booking row with the title, start time, end time, and Google Meet link extracted automatically. If the event already exists it updates. If it is new it creates. The client sees their upcoming and past bookings in the portal without me ever manually entering one. The sync also supports GET for health checks so I can hit it in a browser to verify it is working. One endpoint, one function, one source of truth. Google Calendar is where I manage my schedule. The portal is where clients see theirs. The cron job is the bridge.
Comments coming soon
Sign in with TikTok to leave a comment. Coming soon.