{
  "name": "Hotel Reservation WhatsApp Agent",
  "nodes": [
    {
      "parameters": {
        "sessionIdType": "customKey",
        "sessionKey": "={{ $json.data.from }}"
      },
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.3,
      "position": [
        -96,
        -160
      ],
      "id": "2df91cd1-0849-4310-88dd-a9f846924c4f",
      "name": "Simple Memory"
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "value": "1Q5Lk2tCM37xRT4HGbHIxaCv59EbK-1qjSlWBbVsvnmc",
          "mode": "list",
          "cachedResultName": "Reservation Management(Hospitality)"
        },
        "sheetName": {
          "__rl": true,
          "value": 2045178877,
          "mode": "list",
          "cachedResultName": "FAQ"
        },
        "combineFilters": "OR",
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheetsTool",
      "typeVersion": 4.6,
      "position": [
        112,
        -272
      ],
      "id": "06735285-5a8b-4b2a-bbab-4f686f19490f",
      "name": "Get FAQ",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "GojUvCMDXbhY8HrB",
          "name": "Google Sheets account"
        }
      }
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "1Q5Lk2tCM37xRT4HGbHIxaCv59EbK-1qjSlWBbVsvnmc",
          "mode": "list",
          "cachedResultName": "Reservation Management(Hospitality)"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Reservations"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "CheckInDate": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('CheckInDate', ``, 'string') }}",
            "CheckOutDate": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('CheckOutDate', ``, 'string') }}",
            "TotalAmount": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('TotalAmount', ``, 'string') }}",
            "Status": "=Rescheduled",
            "RescheduleAt": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('RescheduleAt', ``, 'string') }}",
            "BookingID": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('BookingID__using_to_match_', ``, 'string') }}",
            "CheckInTime": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('CheckInTime', ``, 'string') }}",
            "CheckOutStatus": "Pending"
          },
          "matchingColumns": [
            "BookingID"
          ],
          "schema": [
            {
              "id": "BookingID",
              "displayName": "BookingID",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "EventID",
              "displayName": "EventID",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "RoomID",
              "displayName": "RoomID",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "RoomNumber",
              "displayName": "RoomNumber",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "RoomType",
              "displayName": "RoomType",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "GuestName",
              "displayName": "GuestName",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "GuestEmail",
              "displayName": "GuestEmail",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "GuestPhone",
              "displayName": "GuestPhone",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "CheckInDate",
              "displayName": "CheckInDate",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "CheckInTime",
              "displayName": "CheckInTime",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "CheckOutDate",
              "displayName": "CheckOutDate",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Adults",
              "displayName": "Adults",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Children",
              "displayName": "Children",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "TotalAmount",
              "displayName": "TotalAmount",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Status",
              "displayName": "Status",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "CreatedAt",
              "displayName": "CreatedAt",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "RescheduleAt",
              "displayName": "RescheduleAt",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "CheckOutStatus",
              "displayName": "CheckOutStatus",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "SendFollowUps",
              "displayName": "SendFollowUps",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "row_number",
              "displayName": "row_number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "number",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheetsTool",
      "typeVersion": 4.6,
      "position": [
        512,
        -272
      ],
      "id": "a0a77b55-0638-4c4f-9fa8-a9c260b9979b",
      "name": "Reschedule Reservation",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "GojUvCMDXbhY8HrB",
          "name": "Google Sheets account"
        }
      }
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "1Q5Lk2tCM37xRT4HGbHIxaCv59EbK-1qjSlWBbVsvnmc",
          "mode": "list",
          "cachedResultName": "Reservation Management(Hospitality)"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Reservations"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "Status": "Cancelled",
            "BookingID": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('BookingID__using_to_match_', ``, 'string') }}",
            "CheckOutStatus": "Cancelled"
          },
          "matchingColumns": [
            "BookingID"
          ],
          "schema": [
            {
              "id": "BookingID",
              "displayName": "BookingID",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "EventID",
              "displayName": "EventID",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "RoomID",
              "displayName": "RoomID",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "RoomNumber",
              "displayName": "RoomNumber",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "RoomType",
              "displayName": "RoomType",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "GuestName",
              "displayName": "GuestName",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "GuestEmail",
              "displayName": "GuestEmail",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "GuestPhone",
              "displayName": "GuestPhone",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "CheckInDate",
              "displayName": "CheckInDate",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "CheckInTime",
              "displayName": "CheckInTime",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "CheckOutDate",
              "displayName": "CheckOutDate",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Adults",
              "displayName": "Adults",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Children",
              "displayName": "Children",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "TotalAmount",
              "displayName": "TotalAmount",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Status",
              "displayName": "Status",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "CreatedAt",
              "displayName": "CreatedAt",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "RescheduleAt",
              "displayName": "RescheduleAt",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "CheckOutStatus",
              "displayName": "CheckOutStatus",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "SendFollowUps",
              "displayName": "SendFollowUps",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "row_number",
              "displayName": "row_number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "number",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheetsTool",
      "typeVersion": 4.6,
      "position": [
        624,
        -176
      ],
      "id": "5a36371c-df8c-4122-bcfd-7ccfc0bed474",
      "name": "Cancel Reservation",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "GojUvCMDXbhY8HrB",
          "name": "Google Sheets account"
        }
      }
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "1Q5Lk2tCM37xRT4HGbHIxaCv59EbK-1qjSlWBbVsvnmc",
          "mode": "list",
          "cachedResultName": "Reservation Management(Hospitality)"
        },
        "sheetName": {
          "__rl": true,
          "value": 242828116,
          "mode": "list",
          "cachedResultName": "Rooms"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "Status": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Status', ``, 'string') }}",
            "RoomID": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('RoomID__using_to_match_', `collect room_id(e.g, R004)`, 'string') }}"
          },
          "matchingColumns": [
            "RoomID"
          ],
          "schema": [
            {
              "id": "RoomID",
              "displayName": "RoomID",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "RoomNumber",
              "displayName": "RoomNumber",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "RoomType",
              "displayName": "RoomType",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Capacity",
              "displayName": "Capacity",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "BedCapacity",
              "displayName": "BedCapacity",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "BathroomCapacity",
              "displayName": "BathroomCapacity",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "BaseRate",
              "displayName": "BaseRate",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Floor",
              "displayName": "Floor",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "ViewType",
              "displayName": "ViewType",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "SpecialFeatures",
              "displayName": "SpecialFeatures",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Status",
              "displayName": "Status",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "displayName": "row_number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "number",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheetsTool",
      "typeVersion": 4.7,
      "position": [
        944,
        -272
      ],
      "id": "0e35c954-2d9d-4150-b29a-318d9a987051",
      "name": "Update Room Status",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "GojUvCMDXbhY8HrB",
          "name": "Google Sheets account"
        }
      }
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "={{ $json.data.body }}",
        "options": {
          "systemMessage": "=## Overview\nYou are a professional AI assistant for a Grandview Hotel reservation system. You help guests with room bookings, modifications, cancellations, and general inquiries about hotel services and policies.\n\n## General Behavior\n- Always greet users warmly with the hotel name on first interaction\n- Be professional, helpful, and concise\n- Use tools strategically to fetch data and perform actions\n- Never use emojis or markdown formatting in responses\n- Confirm vague inputs rather than making assumptions\n- Always collect complete information before processing bookings\n\n## Core Functions\n\n1. Room Search & Availability\nWhen users ask about rooms or mention keywords like \"room\", \"available\", \"book\", \"reserve\", \"stay\":\nAsking first of only a how many Number of adults and children accompanying you after continue steps:\n**Step 1**: Call \"Get available rooms details\" tool with capacity filter if specified\n**Step 2**: Always Present room options in natural paragraph format including:\n- Room type\n- Price per night\n- ViewType\n- SpecialFeatures\n**Step 3**: Ask: \"Would you like to make a reservation for any of these rooms?\"\n\n2. New Reservation Process\nCollect required information in this order:\n1. **Guest Details**: Full name, email, phone number\n2. **Stay Details**: Check-in date and time, check-out date, Check-out time is fixed 10AM\n3. **Confirmation**: Total amount and booking confirmation\n\nHandle Today, Tomorrow, weekdays using:\n{{ $now.setZone(\"America/New_York\").toFormat(\"yyyy-MM-dd h:mma\") }} {{ [\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"][ $now.setZone(\"America/New_York\").weekday % 7 ] }}\n\n**Before Successful Booking**: \n- Call \"Get available rooms details\" tool to set room_id\n- Call \"Create event\" tool to add calendar entry\n\n**Create Reservation**: Call \"Append Reservation details\" with:\n```\nEventID: [selected event ID from Create event tool]\nRoomID: [selected room ID]\nRoomNumber: [from room details]\nGuestName: [full name]\nGuestEmail: [email address] \nGuestPhone: [phone number]\nCheckInDate: [YYYY-MM-DD format]\nCheckInTime: [12th Hours format]\nCheckOutDate: [YYYY-MM-DD format]\nAdults: [number]\nChildren: [number]\nTotalAmount: [calculated amount]\nStatus: \"Confirmed\"\nCreatedAt: [current timestamp]\n```\n- If Created Reservation after Always Call 'Update Room Status' tool to update room status is 'Not Available'\n- Confirm with: \"Your reservation is confirmed! Booking ID: [ID]. Check-in: [date] at [time], Check-out: [date] at [10AM]\"\n\n3. Modify Existing Reservation\nFor rescheduling requests:\nAlways First ask a Booking ID\n**Step 1**: Call \"Get Reservation details\" using guest booking_id to find booking\n**Step 2**: Every time Confirm booking details with guest after continue\n**Step 3**: Collect new dates/room preferences\n**Step 4**: Every time Confirm provided new checkin and checkout details with guest after continue\n**Step 5**: Call \"Reschedule Reservation\" tool\n**Step 6**: Call calendar using \"Reschedule event\" tool for Reschedule\n**Step 7**: Confirm changes with new dates and booking details\n- Confirm with: \"Your reservation is Rescheduled! Booking ID: [ID]. Check-in: [new date] at [new time], Check-out: [new date] at [10AM]\"\n\n4. Cancel Reservation\nFor cancellation requests:\nAlways First ask a Booking ID\n**Step 1**: Always First Call \"Get Reservation details\" to find booking using bokking_id\n**Step 2**: Every time Confirm booking details with guest after continue\n**Step 3**: Call \"Cancel Reservation\" tool\n**Step 4**: Call \"Cancel event\" to remove calendar entry\n**Step 5**: Call 'Update Room Status' tool to update Status is 'Available'\n**Step 6**: Confirm with: \"Your reservation has been cancelled successfully. We hope to serve you again soon!\"\n\n5. Generate Email\nGenerate professional, polite, and clear customer emails based on the given request type.  \nUse a friendly and helpful tone.  \nAlways personalize the email with the guest’s name, booking ID, and reservation details.  \n\nRequest Types you must handle:  \n1. Booking Request → Confirm reservation with check-in/check-out, room type, total amount, and booking source.  \n2. Reschedule Request → Confirm updated dates and any changes in amount. Mention old and new dates.  \n3. Cancel Request → Confirm cancellation with booking ID and cancellation policy (if provided).  \n\nEmail Output format:\nSubject: <Email Subject>  \nBody: <Email Body with line breaks and polite closing>  \n\nDo not add any extra explanation outside the email.\n\n-Call a immediately after process completed 'Reservation confirm message' tool\n\n6. General Inquiries\nFor questions about policies, amenities, services:\n\n**Step 1**: Call \"Get FAQ\" tool to search for relevant information\n**Step 2**: If information found, provide clear answer based on FAQ content\n**Step 3**: If not found, respond: \"I don't have that specific information available. Please contact our front desk at [phone] for assistance with your inquiry.\"\n\n## Important Rules\n\n### Data Validation\n- Always verify email format contains @\n- Ensure phone numbers are complete\n- Validate dates are not in the past\n- Check check-out date is after check-in date\n- Confirm room capacity matches guest count\n- Fixed a CheckOutTime is 10AM for checkout date\n- Don't allow a user provided a different checkout time\n\n### Error Handling\n- If tools return empty results, inform guest clearly\n- If required information is missing, ask for it specifically\n- Never proceed with incomplete bookings\n\n### Tool Usage Guidelines\n- Use only a tool per user message when possible\n- Never delete header row (row 1) in any sheet\n- Include all required fields when calling tools\n- Handle tool errors gracefully with helpful messages\n\n### Response Format\n- Use natural paragraph format, no bullet points or lists\n- Include specific details like booking IDs, dates, amounts\n- Always confirm next steps with the guest\n- Keep responses professional but warm\n- Avoid technical terms or internal process details\n\n## Current Date/Time Reference\nUse this format for current date/time when needed:\n{{ $now.setZone(\"America/New_York\").toFormat(\"yyyy-MM-dd HH:mma\") }}"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 2,
      "position": [
        272,
        -528
      ],
      "id": "cf35ad0e-4cb7-41c1-8a13-19f904b30a5c",
      "name": "Reservation Management"
    },
    {
      "parameters": {
        "content": "## Google sheet\nCreate your own spreadsheet with these tabs/columns, then select it in the Google Sheets nodes:\n- **Reservation Management(Hospitality) → FAQ**: _(columns as used in the nodes)_\n- **Reservation Management(Hospitality) → Reservations**: `BookingID`, `CheckInDate`, `CheckInTime`, `CheckOutDate`, `TotalAmount`, `Status`, `RescheduleAt`, `CheckOutStatus`, `EventID`, `RoomID`, `RoomNumber`, `RoomType`, `GuestName`, `GuestEmail`, `GuestPhone`, `Adults`, `Children`, `CreatedAt`\n- **Reservation Management(Hospitality) → Rooms**: `RoomID`, `Status`, `Capacity`",
        "width": 256
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -480,
        -592
      ],
      "typeVersion": 1,
      "id": "51366abf-942d-4e73-9835-15ce2e5d2d69",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "updates": [
          "com.twilio.messaging.inbound-message.received"
        ]
      },
      "type": "n8n-nodes-base.twilioTrigger",
      "typeVersion": 1,
      "position": [
        32,
        -528
      ],
      "id": "b95e09cd-2f28-42f5-a6f9-91161daadbc7",
      "name": "Twilio Trigger",
      "webhookId": "2a0af9be-bbcd-4ead-9ba0-e34dce29bbb0",
      "credentials": {
        "twilioApi": {
          "id": "xmQ7NblKKLEiOZwC",
          "name": "Twilio account"
        }
      }
    },
    {
      "parameters": {
        "from": "={{ $('Twilio Trigger').item.json.data.to }}",
        "to": "={{ $('Twilio Trigger').item.json.data.from }}",
        "message": "={{ $json.output }}",
        "options": {}
      },
      "type": "n8n-nodes-base.twilio",
      "typeVersion": 1,
      "position": [
        624,
        -528
      ],
      "id": "21664c0e-cae6-4996-88f0-76acda875c8e",
      "name": "Send an SMS/MMS/WhatsApp message",
      "credentials": {
        "twilioApi": {
          "id": "xmQ7NblKKLEiOZwC",
          "name": "Twilio account"
        }
      }
    },
    {
      "parameters": {
        "operation": "update",
        "calendar": {
          "__rl": true,
          "value": "primary",
          "mode": "list",
          "cachedResultName": "Primary"
        },
        "eventId": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Event_ID', ``, 'string') }}",
        "useDefaultReminders": false,
        "updateFields": {
          "description": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Description', `Update a only new CheckInDate, CheckInTime, CheckOutDate`, 'string') }}",
          "end": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('End', ``, 'string') }}",
          "start": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Start', ``, 'string') }}",
          "summary": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Summary', `set in to this type like 'Reservation for Standard Twin room'`, 'string') }}"
        }
      },
      "type": "n8n-nodes-base.googleCalendarTool",
      "typeVersion": 1.3,
      "position": [
        720,
        -272
      ],
      "id": "b3f742c6-3a68-44cf-95d3-fec7ee24a0c1",
      "name": "Reschedule Event",
      "credentials": {
        "googleCalendarOAuth2Api": {
          "id": "xMYib7VUIpkJCTQG",
          "name": "Google Calendar account"
        }
      }
    },
    {
      "parameters": {
        "operation": "delete",
        "calendar": {
          "__rl": true,
          "value": "primary",
          "mode": "list",
          "cachedResultName": "Primary"
        },
        "eventId": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Event_ID', `Get from Get Reservation details tool`, 'string') }}",
        "options": {}
      },
      "type": "n8n-nodes-base.googleCalendarTool",
      "typeVersion": 1.3,
      "position": [
        832,
        -176
      ],
      "id": "02853300-dc5e-4b1c-be94-02052896cbf7",
      "name": "Cancel Event",
      "credentials": {
        "googleCalendarOAuth2Api": {
          "id": "xMYib7VUIpkJCTQG",
          "name": "Google Calendar account"
        }
      }
    },
    {
      "parameters": {
        "sendTo": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('To', ``, 'string') }}",
        "subject": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Subject', ``, 'string') }}",
        "emailType": "text",
        "message": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Message', ``, 'string') }}",
        "options": {
          "appendAttribution": false
        }
      },
      "type": "n8n-nodes-base.gmailTool",
      "typeVersion": 2.1,
      "position": [
        1072,
        -176
      ],
      "id": "30695e35-e0bd-4bf4-9e1d-26e35ac0c37f",
      "name": "Reservation Confirm Message",
      "webhookId": "9235ca92-61ce-4b43-960e-ff40f0cef442",
      "credentials": {
        "gmailOAuth2": {
          "id": "emmuhpJGs7nAZSDK",
          "name": "Gmail account"
        }
      }
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "value": "1Q5Lk2tCM37xRT4HGbHIxaCv59EbK-1qjSlWBbVsvnmc",
          "mode": "list",
          "cachedResultName": "Reservation Management(Hospitality)"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Reservations"
        },
        "filtersUI": {
          "values": [
            {
              "lookupColumn": "BookingID",
              "lookupValue": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('values0_Value', `collect room_id(e.g, BKG11065)`, 'string') }}"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheetsTool",
      "typeVersion": 4.6,
      "position": [
        416,
        -176
      ],
      "id": "3ec74719-de27-4c6e-8be3-a8f84dc7b316",
      "name": "Get Reservation Details",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "GojUvCMDXbhY8HrB",
          "name": "Google Sheets account"
        }
      }
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "1Q5Lk2tCM37xRT4HGbHIxaCv59EbK-1qjSlWBbVsvnmc",
          "mode": "list",
          "cachedResultName": "Reservation Management(Hospitality)"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Reservations"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "BookingID": "=BKG{{ Math.floor(Math.random() * 100000) }}",
            "RoomID": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('RoomID', ``, 'string') }}",
            "RoomNumber": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('RoomNumber', ``, 'string') }}",
            "GuestName": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('GuestName', ``, 'string') }}",
            "GuestEmail": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('GuestEmail', ``, 'string') }}",
            "GuestPhone": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('GuestPhone', ``, 'string') }}",
            "CheckInDate": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('CheckInDate', ``, 'string') }}",
            "CheckOutDate": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('CheckOutDate', ``, 'string') }}",
            "Adults": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Adults', ``, 'string') }}",
            "Children": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Children', ``, 'string') }}",
            "TotalAmount": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('TotalAmount', `store with $ sing`, 'string') }}",
            "Status": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Status', ``, 'string') }}",
            "CreatedAt": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('CreatedAt', ``, 'string') }}",
            "EventID": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('EventID', ``, 'string') }}",
            "CheckInTime": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('CheckInTime', ``, 'string') }}",
            "CheckOutStatus": "Pending",
            "RoomType": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('RoomType', ``, 'string') }}"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "BookingID",
              "displayName": "BookingID",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "EventID",
              "displayName": "EventID",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "RoomID",
              "displayName": "RoomID",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "RoomNumber",
              "displayName": "RoomNumber",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "RoomType",
              "displayName": "RoomType",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "GuestName",
              "displayName": "GuestName",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "GuestEmail",
              "displayName": "GuestEmail",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "GuestPhone",
              "displayName": "GuestPhone",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "CheckInDate",
              "displayName": "CheckInDate",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "CheckInTime",
              "displayName": "CheckInTime",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "CheckOutDate",
              "displayName": "CheckOutDate",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Adults",
              "displayName": "Adults",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Children",
              "displayName": "Children",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "TotalAmount",
              "displayName": "TotalAmount",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Status",
              "displayName": "Status",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "CreatedAt",
              "displayName": "CreatedAt",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "RescheduleAt",
              "displayName": "RescheduleAt",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "CheckOutStatus",
              "displayName": "CheckOutStatus",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "SendFollowUps",
              "displayName": "SendFollowUps",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheetsTool",
      "typeVersion": 4.6,
      "position": [
        192,
        -176
      ],
      "id": "223c0ee0-a68f-47b1-90f6-f08c1170cbd6",
      "name": "Append Reservation Details",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "GojUvCMDXbhY8HrB",
          "name": "Google Sheets account"
        }
      }
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "value": "1Q5Lk2tCM37xRT4HGbHIxaCv59EbK-1qjSlWBbVsvnmc",
          "mode": "list",
          "cachedResultName": "Reservation Management(Hospitality)"
        },
        "sheetName": {
          "__rl": true,
          "value": 242828116,
          "mode": "list",
          "cachedResultName": "Rooms"
        },
        "filtersUI": {
          "values": [
            {
              "lookupColumn": "Capacity",
              "lookupValue": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('values0_Value', `collect Capacity (e.g, 1)`, 'string') }}"
            },
            {
              "lookupColumn": "Status",
              "lookupValue": "Available"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheetsTool",
      "typeVersion": 4.6,
      "position": [
        304,
        -272
      ],
      "id": "b385b13b-81db-4ae2-9581-ff67772449b0",
      "name": "Get Available Rooms Details",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "GojUvCMDXbhY8HrB",
          "name": "Google Sheets account"
        }
      }
    },
    {
      "parameters": {
        "calendar": {
          "__rl": true,
          "value": "primary",
          "mode": "list",
          "cachedResultName": "Primary"
        },
        "start": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Start', ``, 'string') }}",
        "end": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('End', ``, 'string') }}",
        "useDefaultReminders": false,
        "additionalFields": {
          "attendees": [],
          "description": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Description', `Include full name, phone, email, Booking ID, CheckInDate, CheckInTime, CheckOutDate`, 'string') }}",
          "location": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Location', ``, 'string') }}",
          "summary": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Summary', `set in to this type like 'Reservation for Standard Twin room'`, 'string') }}"
        }
      },
      "type": "n8n-nodes-base.googleCalendarTool",
      "typeVersion": 1.3,
      "position": [
        32,
        -176
      ],
      "id": "e7f3f827-8bff-422e-9433-312e0253a79a",
      "name": "Create Event",
      "credentials": {
        "googleCalendarOAuth2Api": {
          "id": "xMYib7VUIpkJCTQG",
          "name": "Google Calendar account"
        }
      }
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "gpt-4o",
          "mode": "list",
          "cachedResultName": "gpt-4o"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        -192,
        -272
      ],
      "id": "8d83dc3b-69ad-46ef-b809-3a7b3044fb2a",
      "name": "OpenAI Chat Model",
      "credentials": {
        "openAiApi": {
          "id": "SsnwT4koLkkkT1th",
          "name": "OpenAI account"
        }
      }
    }
  ],
  "pinData": {},
  "connections": {
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "Reservation Management",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Get FAQ": {
      "ai_tool": [
        [
          {
            "node": "Reservation Management",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Reschedule Reservation": {
      "ai_tool": [
        [
          {
            "node": "Reservation Management",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Cancel Reservation": {
      "ai_tool": [
        [
          {
            "node": "Reservation Management",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Update Room Status": {
      "ai_tool": [
        [
          {
            "node": "Reservation Management",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Reservation Management": {
      "main": [
        [
          {
            "node": "Send an SMS/MMS/WhatsApp message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Twilio Trigger": {
      "main": [
        [
          {
            "node": "Reservation Management",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Reschedule Event": {
      "ai_tool": [
        [
          {
            "node": "Reservation Management",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Cancel Event": {
      "ai_tool": [
        [
          {
            "node": "Reservation Management",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Reservation Confirm Message": {
      "ai_tool": [
        [
          {
            "node": "Reservation Management",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Get Reservation Details": {
      "ai_tool": [
        [
          {
            "node": "Reservation Management",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Append Reservation Details": {
      "ai_tool": [
        [
          {
            "node": "Reservation Management",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Get Available Rooms Details": {
      "ai_tool": [
        [
          {
            "node": "Reservation Management",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Create Event": {
      "ai_tool": [
        [
          {
            "node": "Reservation Management",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Reservation Management",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "e24d06ee-b1a9-4d32-81f4-cbad7bff7b13",
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "f1c26778ec36097a9722a22c47c5e9c01f00b8862dadd0121ec118026a370fa6"
  },
  "id": "CJEKjd7uiKypd7v5",
  "tags": []
}