Sports Court

WhatsApp assistant for booking sports courts, the customer chats in natural language, pays online and gets their booking confirmed automatically.

General details

Objective

Automate the process of registering bookings, payments, booking changes and inquiry resolution for different sports, previously handled by the business's own staff, which demanded constant time and availability to avoid losing potential sales even outside business hours.

Intervention

An assistant that chats with customers on WhatsApp in natural language, shares information about schedules and prices, automatically assigns an available court based on the request, generates a payment link, and schedules the booking on the business's calendar as soon as the payment is approved, with no need for a person to confirm anything manually. It also allows rescheduling an already-paid booking, and if the customer wants to cancel, the assistant shows their booking details and refers them to the business's staff.

Characteristics
  • Automated WhatsApp support
  • Automatic scheduling based on availability
  • Online payment via Mercado Pago Checkout Pro
  • Automatic booking confirmation after payment verification
  • Automatic release of slots once the payment deadline expires
  • Modification and rescheduling of paid bookings
  • Booking lookup by ID number
  • Cancellation and refund management by staff

Technical details

Technologies
n8nGoogle Gemini
Architecture

An orchestrating AI Agent (Google Gemini, with per-customer memory) converses over WhatsApp and delegates to sub-workflows (tools) built in n8n. Availability, payment and the calendar are not decided by the model — each tool validates them independently against a Data Table that acts as the single source of truth for each booking's status.

WhatsApp Business Cloud APIAI Agent (n8n + Google Gemini)Mercado Pago (Checkout Pro)Google Calendar
Data

n8n Data Table as operational storage for bookings and their statuses (pendiente_pago, confirmando, confirmada, expirada and cancelada); Google Sheets as a backup log and source for analysis; Google Calendar as the representation of confirmed bookings.

Infrastructure

Self-hosted n8n VPS

Security

Prevention of duplicate processing of concurrent payment notifications through an atomic locking mechanism - Idempotent booking confirmation to avoid creating duplicate events in Google Calendar - Credential management through n8n's own credentials system, keeping them out of exported workflows - Restricted cancellations and refunds: the assistant does not perform these operations, which remain the responsibility of authorized staff - Administrative access to booking cancellations through an internal form

Components
  • Orchestration via an AI agent with n8n and Google Gemini.
  • Per-customer conversational memory management.
  • Availability validation through sub-workflows connected to a Data Table.
  • Booking lifecycle management through status states.
  • Payment link generation via Mercado Pago Checkout Pro.
  • Duplicate payment prevention during booking confirmation.
  • Synchronization of confirmed bookings with Google Calendar.
  • Expiration handling and release of unpaid slots.
  • Booking lookup and modification with prior validation.
  • Logging and lookup of operational data via Google Sheets.
  • Internal interface for managing booking cancellations.
Integrations
  • WhatsApp Business Cloud API (Meta)
  • Mercado Pago API
  • Google Calendar API
  • Google Sheets API
  • Google Gemini API