This n8n template automates appointment booking via WhatsApp Flows with real-time calendar availability, AI-powered intent classification, and CRM synchronization. It transforms manual booking conversations into a seamless self-service experience directly within WhatsApp.
Service businesses wanting WhatsApp-based appointment booking
Consultants and agencies offering scheduled calls or consultations
Teams using Airtable for CRM and Google Calendar for scheduling
Businesses looking to reduce booking friction with conversational commerce
Appointment booking typically involves back-and-forth messaging to find available times, collect customer details, and confirm bookings. This workflow eliminates that friction by providing an interactive booking flow within WhatsApp that checks real-time calendar availability, collects customer information, and automatically syncs bookings to your CRM and calendar.
Webhook Entry Point: A single webhook handles both GET (Meta verification) and POST (messages/flows) requests - required due to Meta's single-webhook-per-app restriction.
Message Routing: Incoming requests are classified as either regular WhatsApp messages or encrypted Flow requests, then routed accordingly.
WhatsApp Flow Handling: Flow requests are decrypted using RSA/AES-GCM encryption. The workflow handles multiple Flow actions:
AI Agent: For regular text messages, an OpenAI-powered agent classifies user intent. When booking intent is detected, it triggers the consultation template with the WhatsApp Flow.
Booking Process: On completion, the workflow:
Verify Token: The WHATSAPP_VERIFY_TOKEN environment variable is required for Meta webhook verification. Set this to any secure string and use the same value in Meta Developer Portal.
Cloud vs Self-hosted: Cloud n8n instances are easier to configure as they have public URLs. Self-hosted instances require additional setup for public accessibility.
Hostinger/Docker Setup: For self-hosted instances, configure public webhook access in your docker-compose.yml or reverse proxy configuration.
Meta Prerequisites: You'll need:
Health Checks: Meta sends periodic ping requests to verify webhook availability. The workflow handles these automatically with a 200 response.
Single Webhook Restriction: Meta only allows one webhook URL per WhatsApp app, which is why all message types flow through a single endpoint with routing logic.
Encryption: WhatsApp Flows use end-to-end encryption. The workflow handles RSA decryption (for AES key exchange) and AES-128-GCM encryption/decryption for Flow data.
| Variable | Description |
|---|---|
WHATSAPP_VERIFY_TOKEN |
Webhook verification token (match in Meta Developer Portal) |
WHATSAPP_PRIVATE_KEY |
RSA private key for Flow encryption (PEM format) |
WHATSAPP_PRIVATE_KEY_PASSPHRASE |
Passphrase for the RSA private key |
GOOGLE_CALENDAR_ID |
Calendar ID for availability checks and event creation |
Meta Business Setup
Import Workflow
personal-booking-whatsapp-flow.json into n8nConfigure Credentials
Set Environment Variables
Configure Webhook in Meta
Create WhatsApp Flow
whatsapp-flow.json as your Flow definitionCreate Message Template
Customers Table:
customer_name (text)customer_email (email)phone_number (text)created_at (date)Services Table:
service_name (text)service_key (text) - e.g., "30_min", "60_min"duration_minutes (number)Bookings Table:
customer_email (text)service_type (linked to Services)event_date (date)event_time (text)booking_status (select: Pending, Confirmed, Cancelled)calendar_event_id (text)created_at (date)Consultation Types: Modify the INIT handler code node to add/change consultation options and durations.
Business Hours: Adjust the calendar availability logic in the date refresh handler to match your working hours.
AI Agent Prompts: Customize the system prompt in the AI Agent node to match your business context and available services.
Messaging Templates: Create additional WhatsApp templates for different services (quotes, information requests) and add corresponding tools to the AI agent.
CRM Fields: Extend the Airtable schema and update the booking creation nodes to capture additional customer data.
Made by www.fenrirlabs.nl