WhatsApp and Google Calendar: automate reservations without duplicating appointments
Published on 2026-11-14 by frfrand
Availability flow, confirmation, rescheduling and cancellation with WhatsApp and Google Calendar without duplicate reservations.
# WhatsApp and Google Calendar: automating reservations without duplicating appointments
Two customers may ask for the same time slot at the same time. Checking Google Calendar and then inserting an event without protecting the resource allows both processes to see the slot as free. The Calendar API allows querying and writing events, but a prior check does not replace a lock or transactional restriction in the booking system when concurrency matters.
Minimal architecture
WhatsApp receives the request via webhook; a backend identifies the customer and time zone; an availability service combines business hours, breaks, and busy events; a database manages booking status; Google Calendar reflects confirmed events. The database maintains customer identifiers, resource, start and end time, status, calendar_id, and event_id.
Full flow
- Receive and validate message, deduplicating by provider ID.
- Propose calculated slots for a specific calendar and resource.
- Request confirmation and maintain a temporary reservation with a defined expiration.
- Atomically confirm time slot exclusivity in the database.
- Create or update the event in Calendar and save the remote identifier.
- Send confirmation only after knowing the result; log errors for reconciliation.
Avoiding conflicts
The exclusivity rule depends on the business: same professional, room, or equipment. For PostgreSQL, an exclusion constraint on time ranges is useful when confirmed reservations for the same resource must not overlap. Do not base prevention solely on cache. Temporary holds must expire and retries must reuse the same operation key.
Reschedules and cancellations
Use an explicit state: pending, confirmed, change pending, cancelled. Rescheduling implies reserving the new slot securely before releasing the previous one, with compensation if a stage fails. Cancelling must preserve an auditable reference, update the remote event, and emit a single notification. If Calendar does not respond, mark synchronization as pending and reconcile; never announce a change that was not applied.
Time zone and reminders
Save dates in UTC and the IANA time zone of the business, such as Europe/Lisbon. Present the local time in each message. Consider daylight saving time changes and calendars with different permissions. Outgoing reminders must respect preferences and WhatsApp template rules.
Tests before launch
Simulates simultaneous requests, double webhooks, failure to create event, reconnection after timeout, repeated cancellation, and daylight saving time change. To delve deeper into reservation exclusivity, consult duplicate reservations in PostgreSQL and secure webhooks.
Frequently asked questions
Is it necessary to build everything from scratch? Not always. Start with the minimum process and add integrations when there is a demonstrable need.
How are repeated errors avoided? With stable identifiers, validations, logs, and retry tests.
When to intervene manually? In the face of ambiguous data, persistent errors, and high-impact actions.
Conclusion
Document the process and test its failures before increasing volume. At ArduMaker you can explore the infrastructure and integrations applicable to this scenario.