How to Build an AI Voice Assistant for Phone Reservations with n8n (Free Template)

How to Build an AI Voice Assistant for Phone Reservations with n8n (Free Template)

Your phone rings constantly during peak season. Customers want to book beds, tables, and private areas. They ask about prices, minimum spends, and availability. You're stuck answering the same questions while trying to run your venue. This AI voice assistant handles all of it automatically, 24/7, while you focus on delivering exceptional experiences.

This article teaches you how to build a complete phone reservation system using n8n, AI agents, and telephony integration. You'll get the exact workflow template at the end.

The Problem: Manual Phone Reservations Kill Your Time and Revenue

Beach clubs, restaurants, and event venues lose thousands in potential bookings because they can't answer every call. When you're busy serving customers, managing staff, or handling operations, incoming calls go to voicemail. Customers hang up and book elsewhere.

Current challenges:

  • Missing calls during peak hours means lost revenue (each missed call = potential €50-200 booking)
  • Staff time wasted repeating the same information about prices, hours, and policies
  • Inconsistent information given to customers depending on who answers
  • No systematic way to capture reservation details for follow-up
  • After-hours calls go completely unanswered

Business impact:

  • Time spent: 10-15 hours/week on repetitive phone inquiries
  • Lost bookings: 20-30% of calls during busy periods go unanswered
  • Customer frustration: Callers expect immediate answers, not callbacks

The Solution Overview

This n8n workflow creates an intelligent voice assistant that answers phone calls, understands natural language requests, and manages reservations for multiple venue types. The system integrates telephony services with AI language models to conduct natural conversations, extract booking details, and route information to your preferred notification channels.

The workflow handles bed reservations with variable pricing, table bookings, private area reservations with minimum spends, event inquiries, and general information requests. It uses your venue's floor plan, pricing structure, and policies as its knowledge base to provide accurate, consistent responses.

What You'll Build

This AI voice reservation system delivers complete phone automation with intelligent conversation handling and multi-channel notifications.

Component Technology Purpose
Phone Integration Twilio/Vonage API Receive and manage inbound calls
Conversation Engine OpenAI GPT-4 or Anthropic Claude Natural language understanding and response generation
Knowledge Base Vector embeddings + RAG Store venue details, pricing, policies for accurate responses
Reservation Logic n8n Function Nodes Process booking rules, minimum spends, availability
Notification System WhatsApp/Email/Google Sheets Send reservation details to venue management
Call Routing Twilio Voice webhooks Forward complex requests to human staff when needed

Key capabilities:

  • Answers calls in natural, conversational language
  • Distinguishes between bed, table, privé, event, and information requests
  • Explains pricing, minimum consumption requirements, and policies
  • Captures caller details (name, phone, party size, preferred date/time)
  • Sends structured reservation data via WhatsApp, email, or Google Sheets
  • Handles edge cases by transferring to human staff
  • Operates 24/7 without human intervention

Prerequisites

Before starting, ensure you have:

  • n8n instance (cloud or self-hosted with webhook access)
  • Twilio account with phone number (or Vonage/similar telephony provider)
  • OpenAI API key or Anthropic API key for AI conversation
  • WhatsApp Business API access (or email/Google Sheets alternative)
  • Venue documentation: floor plan, pricing list, policies, hours
  • Basic JavaScript knowledge for Function nodes
  • SSL certificate for webhook endpoints (required for Twilio)

Step 1: Set Up Telephony Integration

The first phase connects your phone number to n8n so incoming calls trigger the workflow. This establishes the entry point for all customer interactions.

Configure Twilio Phone Number

  1. In Twilio Console, navigate to Phone Numbers → Manage → Active Numbers
  2. Select your business phone number
  3. Under Voice & Fax, set "A Call Comes In" to Webhook
  4. Enter your n8n webhook URL: https://your-n8n-instance.com/webhook/voice-reservation
  5. Set HTTP method to POST
  6. Save configuration

Create n8n Webhook Trigger

The Webhook node receives call data from Twilio and initiates the workflow:

{
  "node": "Webhook",
  "type": "n8n-nodes-base.webhook",
  "parameters": {
    "path": "voice-reservation",
    "responseMode": "responseNode",
    "options": {
      "rawBody": true
    }
  }
}

Why this works:
When a customer calls your Twilio number, Twilio sends call metadata (caller ID, timestamp, call SID) to your n8n webhook. The responseNode mode allows n8n to send TwiML (Twilio Markup Language) instructions back, controlling the call flow. Raw body access ensures you capture all Twilio parameters for logging and debugging.

Variables to customize:

  • path: Change to match your URL structure
  • Add authentication if webhook is publicly accessible

Step 2: Build the AI Conversation Engine

This phase creates the intelligent agent that understands customer requests and responds naturally. The AI needs context about your venue to provide accurate information.

Prepare Knowledge Base

  1. Create a structured document containing:

    • Complete floor plan with bed/table identifiers
    • Pricing matrix (bed types, table sizes, privé minimum spend)
    • Reservation policies (cancellation, deposit requirements)
    • Business hours and seasonal schedules
    • Location and contact information
  2. Convert this to embeddings for retrieval:

{
  "node": "Embeddings OpenAI",
  "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
  "parameters": {
    "model": "text-embedding-3-small",
    "options": {
      "dimensions": 1536
    }
  }
}

Configure AI Agent Node

The AI Agent node orchestrates the conversation, using your knowledge base to answer questions accurately:

{
  "node": "AI Agent",
  "type": "@n8n/n8n-nodes-langchain.agent",
  "parameters": {
    "promptType": "define",
    "text": "You are a reservation assistant for Café Paris beach club in Santa Pola. Your role is to help customers book beds, tables, or the privé area, answer questions about pricing and policies, and collect booking details.

When a customer calls:
1. Greet them warmly and ask what they need (bed/table/privé/event/information)
2. Provide accurate pricing and availability based on the knowledge base
3. Explain minimum consumption requirements clearly
4. Collect: name, phone number, party size, preferred date and time
5. Confirm all details before ending the call
6. If the request is complex or you're unsure, offer to transfer to a staff member

Always be friendly, professional, and concise. Use natural conversational language.",
    "options": {
      "systemMessage": "Current date: {{$now.format('YYYY-MM-DD')}}. You have access to venue information through the knowledge base tool."
    }
  }
}

Connect Vector Store for Retrieval

The Vector Store node enables the AI to search your knowledge base for relevant information:

{
  "node": "Pinecone Vector Store",
  "type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
  "parameters": {
    "mode": "retrieve",
    "topK": 3
  }
}

Why this approach:
The AI agent uses retrieval-augmented generation (RAG) to ground responses in your actual venue data. When a customer asks "How much is a front-row bed?", the agent searches the vector store for pricing information, retrieves the exact details, and formulates a natural response. This prevents hallucinations and ensures accuracy. The topK: 3 parameter returns the three most relevant knowledge chunks, giving the AI sufficient context without overwhelming the prompt.

Critical settings:

  • Use GPT-4 or Claude 3 Sonnet for better conversation quality (GPT-3.5 struggles with complex multi-turn dialogues)
  • Set temperature to 0.3-0.5 for consistent, predictable responses
  • Include current date in system message so AI understands "this weekend" or "next Friday"

Step 3: Extract and Structure Reservation Data

After the conversation, you need to extract booking details into a structured format for processing. The AI's responses are natural language; you need database-ready data.

Parse Conversation for Key Information

Use a Function node to extract structured data from the conversation transcript:

// Extract reservation details from AI conversation
const transcript = $input.item.json.transcript;
const reservationType = $input.item.json.reservationType; // bed/table/prive/event

// Parse customer information
const nameMatch = transcript.match(/name[:\s]+([A-Za-z\s]+)/i);
const phoneMatch = transcript.match(/phone[:\s]+(\+?\d[\d\s-]+)/i);
const partySizeMatch = transcript.match(/(\d+)\s*(people|persons|guests)/i);
const dateMatch = transcript.match(/(\d{4}-\d{2}-\d{2})/);
const timeMatch = transcript.match(/(\d{1,2}:\d{2})/);

// Structure the reservation
const reservation = {
  type: reservationType,
  customerName: nameMatch ? nameMatch[1].trim() : null,
  phone: phoneMatch ? phoneMatch[1].replace(/\s/g, '') : null,
  partySize: partySizeMatch ? parseInt(partySizeMatch[1]) : null,
  date: dateMatch ? dateMatch[1] : null,
  time: timeMatch ? timeMatch[1] : null,
  timestamp: new Date().toISOString(),
  callSid: $input.item.json.callSid,
  status: 'pending_confirmation'
};

// Validate required fields
const requiredFields = ['customerName', 'phone', 'partySize', 'date'];
const missingFields = requiredFields.filter(field => !reservation[field]);

if (missingFields.length > 0) {
  reservation.status = 'incomplete';
  reservation.missingFields = missingFields;
}

return { json: reservation };

Why this works:
Regular expressions extract specific data patterns from natural conversation. The AI might say "The reservation is for Maria Rodriguez, party of 4, on June 15th at 2 PM." This function parses that into structured fields. The validation check ensures you don't send incomplete reservations to your notification system. If critical information is missing, the workflow can trigger a follow-up call or SMS.

Apply Business Rules

Add a second Function node to apply venue-specific logic:

const reservation = $input.item.json;

// Calculate minimum spend based on reservation type
const minimumSpend = {
  'bed_front_row': 80,
  'bed_standard': 50,
  'table_4': 40,
  'table_6': 60,
  'prive': 60,
  'event': null // Custom quote
};

// Determine pricing tier (weekday vs weekend)
const reservationDate = new Date(reservation.date);
const isWeekend = [0, 6].includes(reservationDate.getDay());

reservation.pricingTier = isWeekend ? 'weekend' : 'weekday';
reservation.minimumSpend = minimumSpend[reservation.type] || 0;

// Add venue-specific notes
if (reservation.type === 'prive' && reservation.partySize > 8) {
  reservation.notes = 'Large group - may require multiple privé sections';
}

if (reservation.type === 'event' && reservation.partySize > 20) {
  reservation.notes = 'Event booking - requires manager approval';
  reservation.requiresApproval = true;
}

return { json: reservation };

Step 4: Send Notifications to Venue Management

The final phase delivers reservation details through your preferred channels. You want immediate notification when bookings come in.

WhatsApp Notification

Configure the WhatsApp Business node to send formatted reservation details:

{
  "node": "WhatsApp",
  "type": "n8n-nodes-base.whatsApp",
  "parameters": {
    "operation": "sendMessage",
    "to": "+34-YOUR-MANAGER-PHONE",
    "message": "🏖️ NEW RESERVATION

Type: {{$json.type}}
Name: {{$json.customerName}}
Phone: {{$json.phone}}
Party Size: {{$json.partySize}}
Date: {{$json.date}}
Time: {{$json.time}}
Minimum Spend: €{{$json.minimumSpend}}

{{$json.notes}}

Call SID: {{$json.callSid}}"
  }
}

Google Sheets Logging

Simultaneously log all reservations to a Google Sheet for record-keeping:

{
  "node": "Google Sheets",
  "type": "n8n-nodes-base.googleSheets",
  "parameters": {
    "operation": "append",
    "sheetId": "YOUR_SHEET_ID",
    "range": "Reservations!A:J",
    "options": {
      "valueInputMode": "USER_ENTERED"
    }
  }
}

Email Backup

Send a formatted email as backup notification:

{
  "node": "Send Email",
  "type": "n8n-nodes-base.emailSend",
  "parameters": {
    "fromEmail": "reservations@cafeparis-santapola.com",
    "toEmail": "manager@cafeparis-santapola.com",
    "subject": "New Reservation: {{$json.customerName}} - {{$json.date}}",
    "emailFormat": "html",
    "message": "<h2>Reservation Details</h2><table><tr><td>Type:</td><td>{{$json.type}}</td></tr><tr><td>Customer:</td><td>{{$json.customerName}}</td></tr><tr><td>Phone:</td><td>{{$json.phone}}</td></tr><tr><td>Party Size:</td><td>{{$json.partySize}}</td></tr><tr><td>Date/Time:</td><td>{{$json.date}} at {{$json.time}}</td></tr><tr><td>Minimum Spend:</td><td>€{{$json.minimumSpend}}</td></tr></table>"
  }
}

Workflow Architecture Overview

This workflow consists of 12 nodes organized into 4 main sections:

  1. Call handling (Nodes 1-3): Webhook receives call, Twilio node manages voice interaction, initial greeting played
  2. AI conversation (Nodes 4-7): AI Agent conducts conversation, Vector Store provides knowledge base, conversation transcript captured
  3. Data processing (Nodes 8-10): Function nodes extract and validate reservation data, business rules applied
  4. Notification delivery (Nodes 11-12): WhatsApp, email, and Google Sheets nodes send reservation details

Execution flow:

  • Trigger: Inbound phone call to Twilio number
  • Average run time: 45-90 seconds per call (depends on conversation length)
  • Key dependencies: Twilio account, OpenAI API, WhatsApp Business API, Google Sheets access

Critical nodes:

  • AI Agent: Handles natural language conversation, retrieves venue information, collects booking details
  • Function (Data Extraction): Parses conversation transcript into structured reservation object
  • Function (Business Rules): Applies pricing logic, minimum spends, and venue-specific requirements
  • WhatsApp: Delivers immediate notification to venue manager's phone

The complete n8n workflow JSON template is available at the bottom of this article.

Critical Configuration Settings

Twilio Voice Integration

Required fields:

  • Account SID: Your Twilio account identifier
  • Auth Token: API authentication token
  • Phone Number: Your Twilio number in E.164 format (+34XXXXXXXXX)
  • Webhook URL: https://your-n8n-instance.com/webhook/voice-reservation
  • TwiML Response: Must return valid XML for call control

Common issues:

  • Using HTTP instead of HTTPS → Twilio requires SSL for webhooks
  • Incorrect TwiML syntax → Call fails silently, check Twilio debugger logs
  • Webhook timeout (10 seconds) → Use async processing for long AI responses

OpenAI API Configuration

Required settings:

  • Model: gpt-4-turbo-preview (better conversation quality than GPT-3.5)
  • Max tokens: 500 (sufficient for reservation conversations)
  • Temperature: 0.4 (balanced between creativity and consistency)
  • System prompt: Include current date, venue name, role definition

Why this approach:
GPT-4 understands complex, multi-turn conversations better than GPT-3.5. A customer might say "Actually, can we change that to 6 people instead of 4?" mid-conversation. GPT-4 tracks context accurately. The temperature of 0.4 ensures responses are professional and consistent while still sounding natural. Higher temperatures (0.7+) produce more creative but less predictable responses, which you don't want for reservation handling.

Variables to customize:

  • minimumSpend: Update based on your pricing structure
  • businessHours: Modify for seasonal schedule changes
  • notificationRecipients: Add multiple managers or staff members

Testing & Validation

Test Each Component Individually

  1. Webhook connectivity: Use Twilio's test call feature to verify webhook receives data
  2. AI responses: Run manual executions with sample customer questions, review outputs
  3. Data extraction: Check Function node outputs to ensure all fields parse correctly
  4. Notifications: Verify WhatsApp, email, and Google Sheets receive properly formatted data

Review conversation transcripts in the n8n execution logs. Look for:

  • AI providing incorrect pricing (indicates knowledge base issue)
  • Missing customer information (improve prompt to ask follow-up questions)
  • Unnatural language (adjust temperature or system prompt)

Common troubleshooting:

  • AI hallucinating prices → Ensure vector store contains complete pricing data, increase retrieval topK
  • Incomplete reservations → Add validation prompts: "Before we finish, let me confirm I have your phone number..."
  • WhatsApp delivery failures → Check phone number format (must include country code)

Deployment Considerations

Production Deployment Checklist

Area Requirement Why It Matters
Error Handling Retry logic with exponential backoff on API calls Prevents lost reservations when Twilio or OpenAI has temporary outages
Monitoring Webhook health checks every 5 minutes Detect failures within 5 minutes vs discovering issues when customers complain
Fallback Transfer to human staff if AI confidence < 70% Maintains customer experience when AI encounters edge cases
Rate Limiting Max 10 concurrent calls Prevents OpenAI API quota exhaustion during peak hours
Logging Store full conversation transcripts for 90 days Enables quality improvement and dispute resolution
Security API key rotation every 90 days Reduces risk if credentials are compromised

Customization ideas:

  • Add SMS confirmation to customers after booking
  • Integrate with existing reservation management system (Resy, OpenTable)
  • Implement dynamic pricing based on real-time availability
  • Create dashboard showing daily reservation volume and revenue projections

Use Cases & Variations

Use Case 1: Multi-Location Restaurant Chain

  • Industry: Hospitality
  • Scale: 5 locations, 200+ reservations/day
  • Modifications needed: Add location selection at conversation start, separate knowledge bases per venue, route notifications to location-specific managers

Use Case 2: Event Venue with Complex Packages

  • Industry: Events & Catering
  • Scale: 50-100 event inquiries/week
  • Modifications needed: Expand AI prompt to discuss catering options, A/V requirements, and custom packages; add calendar integration to check availability; create multi-step approval workflow for large events

Use Case 3: Spa & Wellness Center

  • Industry: Health & Wellness
  • Scale: 30-50 appointment requests/day
  • Modifications needed: Integrate with scheduling software (Acuity, Calendly), add service duration to booking logic, implement therapist availability checking, send appointment reminders via SMS

Customizing This Workflow

Alternative Integrations

Instead of Twilio:

  • Vonage (Nexmo): Better international calling rates - requires 3 node configuration changes (webhook format, TwiML → NCCO conversion)
  • Plivo: Lower cost for high-volume operations - swap Twilio node for HTTP Request node with Plivo API
  • Telnyx: Best for self-hosted deployments - similar webhook structure to Twilio

Instead of WhatsApp:

  • Slack: Better for team coordination - use Slack node, create dedicated #reservations channel
  • Telegram: No business account required - simpler setup, use Telegram Bot API
  • SMS: Universal fallback - use Twilio SMS node, less rich formatting

Workflow Extensions

Add automated confirmation calls:

  • Add Schedule node to run 24 hours before reservation
  • Use Twilio's text-to-speech to call customer
  • Confirm attendance or offer easy cancellation
  • Nodes needed: +4 (Schedule Trigger, Google Sheets Lookup, Twilio Voice, Update Sheet)

Scale to handle multiple languages:

  • Detect caller language in first 10 seconds
  • Switch AI system prompt to Spanish, French, German, or English
  • Use OpenAI's multilingual capabilities (GPT-4 handles 50+ languages)
  • Performance: No speed impact, same node count

Integration possibilities:

Add This To Get This Complexity
Stripe payment Collect deposits for high-value reservations Medium (6 nodes)
Google Calendar Block reserved time slots automatically Easy (3 nodes)
Airtable CRM Build customer database with visit history Medium (5 nodes)
Zapier webhook Connect to 5,000+ other apps Easy (2 nodes)

Get Started Today

Ready to automate your phone reservations?

  1. Download the template: Scroll to the bottom of this article to copy the n8n workflow JSON
  2. Import to n8n: Go to Workflows → Import from URL or File, paste the JSON
  3. Configure your services: Add API credentials for Twilio, OpenAI, WhatsApp, and Google Sheets
  4. Prepare your knowledge base: Create a document with your venue's floor plan, pricing, and policies
  5. Test with sample calls: Use Twilio's test numbers to verify the workflow before going live
  6. Deploy to production: Point your business phone number to the webhook and activate

Need help customizing this workflow for your specific venue or business? Schedule an intro call with Atherial.

Complete N8N Workflow Template

Copy the JSON below and import it into your N8N instance via Workflows → Import from File

{
  "name": "AI Voice Reservation Agent - Café Paris",
  "nodes": [
    {
      "id": "twilio-trigger",
      "name": "Twilio Call Trigger",
      "type": "n8n-nodes-base.twilioTrigger",
      "position": [
        60,
        200
      ],
      "parameters": {
        "updates": [
          "com.twilio.voice.insights.call-summary.complete"
        ]
      },
      "typeVersion": 1
    },
    {
      "id": "extract-call-data",
      "name": "Extract Call Data",
      "type": "n8n-nodes-base.set",
      "position": [
        300,
        200
      ],
      "parameters": {
        "mode": "manual",
        "assignments": {
          "assignments": [
            {
              "id": "1",
              "name": "phoneNumber",
              "value": "={{ $json.data.participants[0].phone_number }}"
            },
            {
              "id": "2",
              "name": "callDuration",
              "value": "={{ $json.data.call_summary.duration_seconds }}"
            },
            {
              "id": "3",
              "name": "transcriptionText",
              "value": "={{ $json.data.call_summary.transcription }}"
            },
            {
              "id": "4",
              "name": "callId",
              "value": "={{ $json.data.call_sid }}"
            },
            {
              "id": "5",
              "name": "timestamp",
              "value": "={{ new Date().toISOString() }}"
            }
          ]
        },
        "includeOtherFields": false
      },
      "typeVersion": 3
    },
    {
      "id": "ai-parse-reservation",
      "name": "AI Parse Reservation Details",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        540,
        200
      ],
      "parameters": {
        "url": "https://api.openai.com/v1/chat/completions",
        "body": {
          "model": "gpt-4",
          "messages": [
            {
              "role": "system",
              "content": "You are a reservation agent for Café Paris. Extract reservation details from the transcription. Return JSON with: reservationType (bed/table/prive/event), date, time, partySize, guestName, guestPhone, specialRequests, duration (in hours), and pricingTier (standard/premium/vip). If information is missing, indicate as null."
            },
            {
              "role": "user",
              "content": "{{ $json.transcriptionText }}"
            }
          ],
          "temperature": 0.3
        },
        "method": "POST",
        "headers": {
          "Content-Type": "application/json"
        },
        "sendBody": true,
        "contentType": "json",
        "sendHeaders": true,
        "authentication": "genericCredentialType"
      },
      "typeVersion": 4
    },
    {
      "id": "parse-ai-response",
      "name": "Parse AI Response",
      "type": "n8n-nodes-base.set",
      "position": [
        780,
        200
      ],
      "parameters": {
        "mode": "manual",
        "assignments": {
          "assignments": [
            {
              "id": "1",
              "name": "reservationDetails",
              "value": "={{ JSON.parse($json.body.choices[0].message.content) }}"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3
    },
    {
      "id": "check-reservation-type",
      "name": "Check Reservation Type",
      "type": "n8n-nodes-base.if",
      "position": [
        1020,
        200
      ],
      "parameters": {
        "conditions": {
          "rules": [
            {
              "id": "1",
              "type": "string",
              "value": "{{ $json.reservationDetails.reservationType }}",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "singleValue": true
              },
              "leftValue": "bed"
            }
          ]
        }
      },
      "typeVersion": 2
    },
    {
      "id": "save-to-sheets",
      "name": "Save to Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1260,
        100
      ],
      "parameters": {
        "url": "=https://sheets.googleapis.com/v4/spreadsheets/{{ $json.reservationDetails.reservationType }}_spreadsheet_id/values/'Reservations'!A:H:append",
        "body": {
          "values": [
            [
              "={{ $json.phoneNumber }}",
              "={{ $json.reservationDetails.guestName }}",
              "={{ $json.reservationDetails.date }}",
              "={{ $json.reservationDetails.time }}",
              "={{ $json.reservationDetails.partySize }}",
              "={{ $json.reservationDetails.duration }}",
              "={{ $json.reservationDetails.pricingTier }}",
              "={{ $json.reservationDetails.specialRequests }}"
            ]
          ]
        },
        "method": "POST",
        "sendBody": true,
        "contentType": "json",
        "authentication": "predefinedCredentialType"
      },
      "typeVersion": 4
    },
    {
      "id": "calculate-pricing",
      "name": "Calculate Dynamic Pricing",
      "type": "n8n-nodes-base.set",
      "position": [
        1260,
        250
      ],
      "parameters": {
        "mode": "manual",
        "assignments": {
          "assignments": [
            {
              "id": "1",
              "name": "pricingLookup",
              "value": "={{ {'bed': {'standard': 45, 'premium': 75, 'vip': 120}, 'table': {'standard': 35, 'premium': 65, 'vip': 100}, 'prive': {'standard': 500, 'premium': 800, 'vip': 1200}, 'event': {'standard': 2000, 'premium': 4000, 'vip': 7000}} }}"
            },
            {
              "id": "2",
              "name": "reservationType",
              "value": "={{ $json.reservationDetails.reservationType }}"
            },
            {
              "id": "3",
              "name": "pricingTier",
              "value": "={{ $json.reservationDetails.pricingTier }}"
            },
            {
              "id": "4",
              "name": "basePrice",
              "value": "={{ $json.pricingLookup[$json.reservationType][$json.pricingTier] }}"
            },
            {
              "id": "5",
              "name": "totalPrice",
              "value": "={{ $json.basePrice * ($json.reservationDetails.duration || 1) }}"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3
    },
    {
      "id": "send-whatsapp-confirmation",
      "name": "Send WhatsApp Confirmation",
      "type": "n8n-nodes-base.whatsApp",
      "position": [
        1500,
        100
      ],
      "parameters": {
        "resource": "message",
        "textBody": "Thank you! Your reservation at Café Paris has been confirmed. Type: {{ $json.reservationType }}, Date: {{ $json.reservationDetails.date }}, Time: {{ $json.reservationDetails.time }}, Party Size: {{ $json.reservationDetails.partySize }}, Total: €{{ $json.totalPrice }}. Special requests: {{ $json.reservationDetails.specialRequests }}. We look forward to seeing you!",
        "recipientPhoneNumber": "={{ $json.phoneNumber }}"
      },
      "typeVersion": 1
    },
    {
      "id": "send-email-confirmation",
      "name": "Send Email Confirmation",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        1500,
        250
      ],
      "parameters": {
        "message": "Dear {{ $json.reservationDetails.guestName }},\n\nYour reservation at Café Paris has been confirmed!\n\nReservation Type: {{ $json.reservationType }}\nDate: {{ $json.reservationDetails.date }}\nTime: {{ $json.reservationDetails.time }}\nParty Size: {{ $json.reservationDetails.partySize }}\nDuration: {{ $json.reservationDetails.duration }} hours\nPricing Tier: {{ $json.reservationDetails.pricingTier }}\nTotal Cost: €{{ $json.totalPrice }}\nPhone: {{ $json.phoneNumber }}\nSpecial Requests: {{ $json.reservationDetails.specialRequests }}\n\nPlease arrive 10 minutes early. For changes, contact us at +33-1-XX-XX-XX-XX\n\nBest regards,\nCafé Paris Team",
        "subject": "Reservation Confirmation - Café Paris {{ $json.reservationDetails.date }}",
        "toEmail": "={{ $json.reservationDetails.guestEmail || 'admin@cafeparis.com' }}",
        "resource": "email",
        "fromEmail": "reservations@cafeparis.com",
        "operation": "send"
      },
      "typeVersion": 2
    },
    {
      "id": "send-sms-backup",
      "name": "Send SMS Backup Confirmation",
      "type": "n8n-nodes-base.twilio",
      "position": [
        1500,
        400
      ],
      "parameters": {
        "to": "={{ $json.phoneNumber }}",
        "from": "+33XXXXXXXXXX",
        "message": "Café Paris Reservation Confirmed! {{ $json.reservationType }} on {{ $json.reservationDetails.date }} at {{ $json.reservationDetails.time }} for {{ $json.reservationDetails.partySize }} people. Total: €{{ $json.totalPrice }}. Ref: {{ $json.callId }}",
        "resource": "sms",
        "operation": "send"
      },
      "typeVersion": 1
    },
    {
      "id": "log-confirmation",
      "name": "Log Confirmation",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1740,
        250
      ],
      "parameters": {
        "range": "A:I",
        "values": {
          "values": [
            [
              "={{ $json.timestamp }}",
              "={{ $json.phoneNumber }}",
              "={{ $json.callId }}",
              "={{ $json.callDuration }}",
              "={{ $json.reservationType }}",
              "={{ $json.reservationDetails.date }}",
              "={{ $json.totalPrice }}",
              "confirmed",
              "={{ 'WhatsApp, Email, SMS' }}"
            ]
          ]
        },
        "operation": "append",
        "sheetName": "Confirmation Log",
        "documentId": "{{ $json.summarySheetId }}"
      },
      "typeVersion": 4
    },
    {
      "id": "workflow-complete",
      "name": "Workflow Complete",
      "type": "n8n-nodes-base.set",
      "position": [
        1980,
        250
      ],
      "parameters": {
        "mode": "manual",
        "assignments": {
          "assignments": [
            {
              "id": "1",
              "name": "status",
              "value": "success"
            },
            {
              "id": "2",
              "name": "message",
              "value": "Reservation processed and confirmations sent successfully"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3
    }
  ],
  "connections": {
    "Log Confirmation": {
      "main": [
        [
          {
            "node": "Workflow Complete",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Call Data": {
      "main": [
        [
          {
            "node": "AI Parse Reservation Details",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse AI Response": {
      "main": [
        [
          {
            "node": "Check Reservation Type",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Twilio Call Trigger": {
      "main": [
        [
          {
            "node": "Extract Call Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Save to Google Sheets": {
      "main": [
        [
          {
            "node": "Send WhatsApp Confirmation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Reservation Type": {
      "main": [
        [
          {
            "node": "Calculate Dynamic Pricing",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Calculate Dynamic Pricing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Email Confirmation": {
      "main": [
        [
          {
            "node": "Send SMS Backup Confirmation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calculate Dynamic Pricing": {
      "main": [
        [
          {
            "node": "Save to Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send WhatsApp Confirmation": {
      "main": [
        [
          {
            "node": "Send Email Confirmation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Parse Reservation Details": {
      "main": [
        [
          {
            "node": "Parse AI Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send SMS Backup Confirmation": {
      "main": [
        [
          {
            "node": "Log Confirmation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}