Complete Booking System with Google Calendar, Business Hours & REST API
GCalendar Smart Booking System
Demo
github code Try yourself
š Description
Transform your booking chaos into streamlined automation with this production-ready GCalendar Smart Booking System. This comprehensive n8n workflow eliminates weeks of custom development by providing two powerful REST APIs that handle everything from input validation to calendar integration.
What makes this special? Unlike basic booking forms, this system includes enterprise-grade features like intelligent conflict detection, public holiday awareness, business hours enforcement, and automatic Google Calendar integration with Meet links. It's battle-tested with real-world business logic including lunch breaks, timezone handling, and comprehensive error responses.
Privacy & Cost Benefits: š Privately yours & free** - No need to purchase expensive booking software or worry about data breaches. Your booking data stays secure in your own Google Calendar, completely under your control. šÆ All-in-One solution** - No manual invitation sending required. Google Calendar automatically handles attendee notifications and generates real Google Meet links for every booking, creating a seamless experience for both you and your clients. No need pay for API to get public holiday, use the google calendar free default .
Perfect for rapid deployment: Whether you're building for clients, launching an MVP, or replacing expensive booking software, this template gets you from zero to production in under 15 minutes. The clean API design makes frontend integration effortless, while the robust validation ensures reliable operation at scale.
Two endpoints, endless possibilities: /make-booking - Complete booking creation with multi-layer validation /check-booking-date - Real-time slot availability listing (comes with conflict detection, business hour checks)
Built by developers, for developers - with comprehensive documentation, testing examples, and customization guides included.
Purpose This workflow provides a webhook API endpoint that your frontend can easily integrate typically triggered by a submit button on a booking form. When the frontend calls this REST API, the workflow handles the booking logic by performing several key checks: Valid Input ā Ensures all required fields are present and correctly formatted. Date & Time Validation ā Confirms the requested slot falls within business hours, excludes lunch/dinner breaks, and respects public holidays. Conflict Detection ā Checks for any existing bookings at the requested time to prevent overlaps. Calendar Integration ā Once all checks pass, the workflow automatically creates a booking entry in your Google Calendar, keeping everything synced and visible.
šÆ Target Audience
This template is perfect for:
š„ Healthcare & Medical Professionals: Clinics, dental offices, physiotherapy centers, and medical practices needing automated appointment scheduling with proper business hours validation and no-show reduction.
š¼ Professional Service Providers: Consultants, lawyers, accountants, financial advisors, and coaches who require sophisticated booking systems with calendar integration and conflict prevention.
š Educational Institutions: Universities, tutoring centers, training academies, and educational consultants needing student appointment scheduling with academic calendar integration.
š¢ Small to Medium Businesses: Service-based businesses like salons, spas, repair services, and consulting firms looking to automate their booking process without expensive software subscriptions.
šØāš» Software Development Teams: Developers and engineering teams who need to rapidly deploy booking functionality for client projects without building from scratch.
š Digital Agencies: Web development agencies, marketing firms, and digital consultancies building booking solutions for multiple clients across different industries.
šØ Hospitality & Events: Meeting room booking, event venue scheduling, equipment rental companies, and co-working spaces requiring intelligent availability management.
š§ Freelancers & Solo Entrepreneurs: Independent professionals like designers, photographers, personal trainers, and contractors who need professional booking systems on a budget.
š Product Managers: Teams building SaaS products that require booking/scheduling features as part of their core functionality or user experience.
š Startup Founders: Early-stage companies needing to validate booking-related business models quickly without significant development investment.
šØ Creative Professionals: Photographers, videographers, music instructors, and artists who need client appointment scheduling with portfolio integration possibilities.
āļø Technical Operations Teams: DevOps engineers and system administrators who need to implement booking systems for internal resource allocation (servers, equipment, meeting rooms).
This template eliminates weeks of development time while providing enterprise-grade validation, making it ideal for anyone who values rapid deployment, reliability, and professional functionality in their booking systems.
āļø How It Works
š Booking Flow (Step-by-Step)
Phase 1: Input Validation // Real validation logic from the workflow ā Name, email, phone, date, time validation ā Email format verification (RFC compliant) ā Phone number format checking ā Date/time format standardization (YYYY-MM-DD, HH:MM)
Phase 2: Business Logic Validation
// Business hours: Monday-Friday, 9AM-9PM (customizable)
ā
Weekend blocking
ā
Business hours enforcement
ā
Lunch break exclusion (12PM-2PM)
ā
Dinner break exclusion (6PM-8PM)
ā
Timezone handling (Malaysia/UTC+8 default)
Phase 3: Intelligent Conflict Detection // Multi-calendar checking ā Public holiday calendar integration ā Main booking calendar conflict detection ā Real-time availability verification ā Overlap prevention algorithms
Phase 4: Calendar Integration // Google Calendar automation ā Event creation with attendee invitation ā Google Meet link generation ā Custom event descriptions and summaries ā Calendar color coding
š Availability API Flow
Date Input ā Validates YYYY-MM-DD format Weekend/Holiday Check ā Blocks non-working days Slot Generation ā Creates available time slots Conflict Mapping ā Marks booked vs available slots Response Formatting ā Returns structured availability data
š ļø Quick Start Guide
Prerequisites n8n instance (cloud or self-hosted) Google Cloud Project with Calendar API enabled Google Calendar credentials
Simple Setup Guide
Step 1: Import the Workflow ā¬ļø Download the smart-booking-system.json file In your n8n instance: Workflows ā Import from File Select the downloaded JSON file Click Import
Step 2: Set Up Google Calendar Credentials š Create Google Cloud Project: Go to Google Cloud Console Create new project or select existing one Enable Google Calendar API
Configure n8n Credentials: In n8n: Credentials ā Add Credential ā Google Calendar OAuth2 API Enter your Google Cloud Client ID and Client Secret Save as "Google Calendar account"
Update Workflow Nodes: Find nodes: Create Calendar Event, Check Calendar Availability, etc. Select your Google Calendar credential in each node
Step 3: Configure Your Calendars š Main Booking Calendar: Create a dedicated Google Calendar for bookings Copy the Calendar ID (found in Calendar Settings) Replace YOUR_BOOKING_CALENDAR_ID@group.calendar.google.com in these nodes: Create Calendar Event Check Calendar Availability - Main Check Calendar Availability
Holiday Calendar (Optional): Add your country's holiday calendar to Google Calendar Find the calendar ID (e.g., en.usa#holiday@group.v.calendar.google.com) Update Check Calendar Availability - public holiday and Check Public Holiday Calendar nodes
Step 4: Customize Business Hours ā° Find the ConfigTimeSlots node Edit the time slots array: [ { "time": "09:30", "display": "9:30 AM - 10:30 AM", "available": true }, { "time": "10:30", "display": "10:30 AM - 11:30 AM", "available": true }, { "time": "11:30", "display": "11:30 AM - 12:30 PM", "available": true }, { "time": "14:30", "display": "2:30 PM - 3:30 PM", "available": true }, { "time": "15:30", "display": "3:30 PM - 4:30 PM", "available": true }, { "time": "16:30", "display": "4:30 PM - 5:30 PM", "available": true }, { "time": "17:30", "display": "5:30 PM - 6:30 PM", "available": true }, { "time": "20:30", "display": "8:30 PM - 9:30 PM", "available": true } ]
Step 5: Activate & Test š Activate the workflow: Toggle the workflow Active switch Get your webhook URLs: Booking: https://your-n8n-domain/webhook/suarify-make-booking Availability: https://your-n8n-domain/webhook/suarify-check-booking-date
Test with sample requests:
Test booking creation
curl -X POST 'https://your-n8n-domain/webhook/suarify-make-booking'
-H 'Content-Type: application/json'
-d '{
"name": "John Doe",
"email": "john@example.com",
"phone": "+1234567890",
"date": "2024-03-15",
"time": "14:30"
}'
Test availability checking
curl -X POST 'https://your-n8n-domain/webhook/suarify-check-booking-date'
-H 'Content-Type: application/json'
-d '{"date": "2024-03-15"}'
Step 6: Integrate with Your Frontend š» Use the webhook URLs in your booking form Handle the JSON responses for success/error states Display available time slots from the availability API
š You're ready to start taking bookings!
š API Documentation
š¤ Booking Creation API
Endpoint: POST /webhook/make-booking
Request Body: { "name": "John Doe", "email": "john@example.com", "phone": "+1234567890", "date": "2024-03-15", "time": "14:30", "source": "Website Form" }
Success Response (200): { "success": true, "message": "Booking confirmed successfully!", "bookingDetails": { "name": "John Doe", "email": "john@example.com", "phone": "+1234567890", "date": "2024-03-15", "time": "14:30", "eventId": "abc123def456", "eventLink": "https://calendar.google.com/event?eid=...", "calendarEvent": { /* Full calendar event object */ } }, "confirmationMessage": "Hi John Doe, your booking has been confirmed for 2024-03-15 at 14:30. You will receive a calendar invitation shortly." }
Error Response (400): { "success": false, "error": "Invalid email format", "message": "Booking request failed validation", "details": { /* Error context */ } }
š Availability Check API
Endpoint: POST /webhook/check-booking-date
Request Body: { "date": "2024-03-15" }
Success Response (200): { "success": true, "isWorkingDay": true, "isWeekend": false, "holidayName": "", "availableSlots": [ { "time": "09:30", "display": "9:30 AM - 10:30 AM", "available": true }, { "time": "10:30", "display": "10:30 AM - 11:30 AM", "available": false, "status": "booked" } ], "totalConflicts": 3 }
šļø Customization Guide
Business Hours Configuration Edit the ConfigTimeSlots node to modify available booking times:
const timeSlots = [ { time: '09:00', display: '9:00 AM - 10:00 AM', available: true }, { time: '10:00', display: '10:00 AM - 11:00 AM', available: true }, // Lunch break automatically excluded { time: '14:00', display: '2:00 PM - 3:00 PM', available: true }, // Customize as needed... ];
Timezone Adjustment Modify the Business Hours Check node:
// Change from Malaysia (UTC+8) to your timezone const timezone = 'America/New_York'; // UTC-5 const timezoneOffset = '-05:00';
Holiday Calendar Update calendar ID in holiday checking nodes:
// Replace with your country's holiday calendar "value": "en.usa#holiday@group.v.calendar.google.com"
Business Rules Customize validation in the Business Hours Check node:
// Business hours: Mon-Fri, 9am-6pm (example) const isWithinBusinessHours = timeInMinutes >= 540 && timeInMinutes <= 1080; // Remove lunch breaks if not needed const isNotLunchBreak = true; // Always allow
Start automating in under 15 minutes! š
Made with ā¤ļø for the engineering community. Star this repo if it saves you time!
Related Templates
USDT And TRC20 Wallet Tracker API Workflow for n8n
Overview This n8n workflow is specifically designed to monitor USDT TRC20 transactions within a specified wallet. It u...
Automate Daily Keyword Research with Google Sheets, Suggest API & Custom Search
Who's it for This workflow is perfect for SEO specialists, marketers, bloggers, and content creators who want to automa...
Bulk Automated Google Drive Files Sharing and Direct Download Link Generation
This N8N workflow automates the process of sharing files from Google Drive. It includes OAuth2 authentication, batch pro...
š Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments