Use this robust n8n workflow to manage a complete booking system. It validates user input, checks business hours, public holidays, and Google Calendar availability before confirming an appointment. Essential n8n templates for complex scheduling.
Download this n8n workflow template and start using it instantly.
This comprehensive n8n workflow template creates a powerful, timezone-aware scheduling backend accessible via two distinct REST API endpoints. It solves the challenge of managing complex booking rules—including specific business hours (9 AM to 9 PM, excluding specific breaks like 12 PM - 2 PM and 6 PM - 8 PM), weekends, and public holidays (by querying a separate public holiday calendar). This sophisticated n8n template ensures that every booking is cross-validated against existing appointments in Google Calendar, preventing double bookings.
The workflow includes both the 'Make Booking' endpoint for final confirmation and the 'Check Slots' endpoint for real-time frontend feedback, making it a crucial n8n node setup for any service business that demands scheduling accuracy and robust validation.
This n8n workflow operates in two primary modes, both initialized by an n8n trigger Webhook node:
/make-booking)Booking Webhook n8n trigger node receiving customer data (name, email, date, time) via a POST request.Validate Input Code n8n node performs strict format checks (email, phone, date format) and ensures all required fields are present.Business Hours Check Code n8n node evaluates if the requested time falls within the defined Malaysian business hours (Mon-Fri, 9 AM - 9 PM) while specifically excluding defined break times (lunch and dinner).Check Availability Code n8n node consolidates data from both calendar checks. It performs a time-overlap calculation to ensure the slot is free from both existing appointments and public holidays.Create Calendar Event Google Calendar n8n node generates a new appointment, adding the customer as an attendee. A successful JSON response is then returned./check-booking-date)Booking Timeslot webhook n8n trigger node when a date is selected. The ConfigTimeSlots n8n node loads a predefined array of potential time slots for the day.Process Holiday Check Calendar Code n8n node iterates through the predefined slots. It checks each slot against the actual calendar events for that day. Any slot that overlaps with an existing booking or a holiday is marked as available: false.To deploy this powerful n8n workflow template, follow these steps:
Check Calendar Availability - Main and Create Calendar Event nodes, replace YOURBOOKING[email protected] with your main booking calendar's ID.en.malaysia#[email protected]) can be retained or replaced if you target a different region.ConfigTimeSlots n8n node (used by the 'Get Slots' endpoint) and the logic within the Business Hours Check Code n8n node (used by the 'Make Booking' endpoint) to match your exact operating hours and timezone.This n8n workflow utilizes advanced logic across several key n8n node types:
Booking Webhook (n8n trigger): The primary entry point for a booking request. Key configuration includes the path make-booking and POST method, ensuring it acts as a robust REST API endpoint.
Validate Input (Code n8n node): Essential for security and data integrity. It validates data fields (name, email format using regex, phone number) before processing, ensuring only clean data proceeds through the n8n workflow.
Business Hours Check (Code n8n node): A critical component that embeds complex business logic (Malaysian timezone UTC+8, specific break exclusions). It determines the validity of the requested time and prepares the ISO date strings required for Google Calendar n8n node operations.
Google Calendar n8n node (Check Availability): Used twice in the main flow. The first instance checks the Public Holiday calendar, and the second checks the Main Booking Calendar. Both use the getAll operation to fetch events overlapping the proposed slot.
Check Availability (Code n8n node): This node processes the output of the two Google Calendar n8n node calls. It contains custom logic to detect any time overlap between the proposed booking and existing calendar events or detected public holidays.
Create Calendar Event (Google Calendar n8n node): The final action n8n node. If all checks pass, it uses the start and end times derived from the Business Hours Check to officially create the confirmed event and send out the invitation.
Secure your automation infrastructure with this essential n8n workflow. It provides automated daily backups of all active n8n workflows and sensitive credentials to local disk, with optional FTP transfer. Use this robust n8n template to ensure business continuity.

Automate your entire B2B sales cycle using this complex n8n workflow. It handles Apollo lead generation (via scraping), Mailgun cold outreach, database status tracking (Supabase/Postgres), and uses AI (OpenAI/Anthropic) to draft professional email replies automatically. Leverage n8n templates for ultimate sales efficiency.

Automate robust appointment scheduling, rescheduling, and cancellation using this advanced n8n workflow. It integrates powerful AI agents (Ollama) with Supabase database operations, triggered by a single HTTP request.

Automate comprehensive Google Tasks management—Create, Read, Update, and Delete—using this powerful n8n workflow. Learn how to use the n8n node for AI-driven productivity.

Use this practical n8n workflow to generate secure Time-based One-Time Passwords (TOTP) programmatically. Quickly implement 2FA using the dedicated n8n node.

I embarked on my coding journey at the age of 13, driven by a deep passion for AI, automation, and engineering. Over the years, I've taken on various roles including Developer, Engineer, Senior Engineer, Architect, Principal Engineer, Freelance Consultant, and Head of Engineering.







































