{
  "id": "32sZD8EotVPD5r21",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Hotel Room Price Checker",
  "tags": [],
  "nodes": [
    {
      "id": "4ee06ed2-858c-451d-80d1-50e5149f8be3",
      "name": "Schedule - Every 6 Hours",
      "type": "n8n-nodes-base.scheduleTrigger",
      "notes": "Triggers price check automatically every 6 hours to monitor rate changes",
      "position": [
        -2112,
        64
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours",
              "hoursInterval": 6
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "a1be7480-2816-4d1a-b64d-24a4d123f9e5",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2160,
        -192
      ],
      "parameters": {
        "color": 4,
        "width": 220,
        "height": 396,
        "content": "## \u23f0 TRIGGER\nRuns price check every 6 hours automatically"
      },
      "typeVersion": 1
    },
    {
      "id": "566c0b0a-7671-4ee0-a248-b9ffb8e90d55",
      "name": "Load Hotel List",
      "type": "n8n-nodes-base.code",
      "notes": "Loads list of hotels to monitor from database or configuration",
      "position": [
        -1888,
        64
      ],
      "parameters": {
        "jsCode": "// List of hotels to monitor\n// In production, this would come from a database\nconst hotelsToMonitor = [\n  {\n    hotelId: 'hotel_001',\n    hotelName: 'Grand Plaza Hotel',\n    location: 'New York, USA',\n    roomType: 'Deluxe Suite',\n    bookingUrl: 'https://booking.com/hotel-001',\n    apiEndpoint: 'https://api.hotelbooking.com/rates/hotel_001'\n  },\n  {\n    hotelId: 'hotel_002',\n    hotelName: 'Ocean View Resort',\n    location: 'Miami, USA',\n    roomType: 'Ocean Front Room',\n    bookingUrl: 'https://booking.com/hotel-002',\n    apiEndpoint: 'https://api.hotelbooking.com/rates/hotel_002'\n  },\n  {\n    hotelId: 'hotel_003',\n    hotelName: 'Mountain Lodge',\n    location: 'Aspen, USA',\n    roomType: 'Premium Cabin',\n    bookingUrl: 'https://booking.com/hotel-003',\n    apiEndpoint: 'https://api.hotelbooking.com/rates/hotel_003'\n  },\n  {\n    hotelId: 'hotel_004',\n    hotelName: 'City Center Inn',\n    location: 'Los Angeles, USA',\n    roomType: 'Standard Double',\n    bookingUrl: 'https://booking.com/hotel-004',\n    apiEndpoint: 'https://api.hotelbooking.com/rates/hotel_004'\n  },\n  {\n    hotelId: 'hotel_005',\n    hotelName: 'Desert Oasis Hotel',\n    location: 'Las Vegas, USA',\n    roomType: 'Luxury Suite',\n    bookingUrl: 'https://booking.com/hotel-005',\n    apiEndpoint: 'https://api.hotelbooking.com/rates/hotel_005'\n  }\n];\n\nreturn hotelsToMonitor.map(hotel => ({\n  json: {\n    ...hotel,\n    checkTimestamp: new Date().toISOString(),\n    checkDate: new Date().toLocaleDateString('en-US', { \n      year: 'numeric', \n      month: 'long', \n      day: 'numeric' \n    })\n  }\n}));"
      },
      "typeVersion": 2
    },
    {
      "id": "89a5c7bd-ef50-4a9c-9970-31eca24fe4ae",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1936,
        -144
      ],
      "parameters": {
        "color": 5,
        "width": 220,
        "height": 348,
        "content": "## \ud83c\udfe8 HOTEL LIST\nLoads all hotels that need price monitoring"
      },
      "typeVersion": 1
    },
    {
      "id": "1022f8d7-e6d9-4641-8f54-6f9e8345f928",
      "name": "Fetch Current Price from API",
      "type": "n8n-nodes-base.httpRequest",
      "notes": "Retrieves real-time pricing data from hotel booking API",
      "position": [
        -1680,
        64
      ],
      "parameters": {
        "url": "={{ $json.apiEndpoint }}",
        "options": {
          "response": {
            "response": {
              "neverError": true
            }
          }
        },
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            },
            {
              "name": "Accept",
              "value": "application/json"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "05fee65a-e5f1-455d-b3d3-fc1d8cc35099",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1712,
        -176
      ],
      "parameters": {
        "color": 6,
        "width": 220,
        "height": 380,
        "content": "## \ud83d\udcb0 PRICE API\nFetches current room rates in real-time"
      },
      "typeVersion": 1
    },
    {
      "id": "6721055e-ee7d-475f-a06b-30897d37c293",
      "name": "Parse Price Data",
      "type": "n8n-nodes-base.code",
      "notes": "Extracts and formats current price information from API response",
      "position": [
        -1456,
        64
      ],
      "parameters": {
        "jsCode": "// Parse API response and extract price\n// Since we're simulating, generate random prices\nconst hotelData = $('Load Hotel List').item.json;\n\n// Simulate API response with random price variations\nconst basePrice = Math.floor(Math.random() * (500 - 150 + 1)) + 150;\nconst priceVariation = Math.floor(Math.random() * 50) - 25; // -25 to +25\n\nconst currentPrice = basePrice + priceVariation;\nconst currency = 'USD';\nconst availability = Math.random() > 0.2 ? 'Available' : 'Limited';\n\nreturn {\n  json: {\n    hotelId: hotelData.hotelId,\n    hotelName: hotelData.hotelName,\n    location: hotelData.location,\n    roomType: hotelData.roomType,\n    bookingUrl: hotelData.bookingUrl,\n    currentPrice: currentPrice,\n    currency: currency,\n    availability: availability,\n    checkTimestamp: hotelData.checkTimestamp,\n    checkDate: hotelData.checkDate,\n    pricePerNight: currentPrice,\n    taxesIncluded: true\n  }\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "6f4a0e90-9da5-4a77-b307-9457186ac341",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1488,
        -192
      ],
      "parameters": {
        "color": 5,
        "width": 220,
        "height": 396,
        "content": "## \ud83d\udcca PARSE DATA\nExtracts price and availability info"
      },
      "typeVersion": 1
    },
    {
      "id": "e3731717-d4b4-429f-838a-81fdb625f1b5",
      "name": "Get Previous Price from DB",
      "type": "n8n-nodes-base.httpRequest",
      "notes": "Retrieves last recorded price from database for comparison",
      "position": [
        -1232,
        64
      ],
      "parameters": {
        "url": "https://your-database-api.com/prices/history",
        "options": {
          "response": {
            "response": {
              "neverError": true
            }
          }
        },
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "hotel_id",
              "value": "={{ $json.hotelId }}"
            },
            {
              "name": "room_type",
              "value": "={{ $json.roomType }}"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "01becb4a-1f77-42e6-9c4f-baffbfe89dd9",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1264,
        -240
      ],
      "parameters": {
        "color": 4,
        "width": 220,
        "height": 444,
        "content": "## \ud83d\uddc4\ufe0f DATABASE QUERY\nFetches previous price record"
      },
      "typeVersion": 1
    },
    {
      "id": "4c56305a-577a-4078-9480-67247af82062",
      "name": "Compare Prices",
      "type": "n8n-nodes-base.code",
      "notes": "Calculates price difference and percentage change from previous check",
      "position": [
        -1008,
        64
      ],
      "parameters": {
        "jsCode": "// Compare current price with previous price\nconst currentData = $('Parse Price Data').item.json;\nconst currentPrice = currentData.currentPrice;\n\n// Simulate previous price from database\n// In production, this would come from the actual DB response\nconst previousPrice = currentPrice + Math.floor(Math.random() * 60) - 20; // Random previous price\n\nconst priceDifference = currentPrice - previousPrice;\nconst percentageChange = previousPrice > 0 ? ((priceDifference / previousPrice) * 100).toFixed(2) : 0;\nconst priceChanged = priceDifference !== 0;\nconst priceReduced = priceDifference < 0;\nconst priceIncreased = priceDifference > 0;\n\nreturn {\n  json: {\n    ...currentData,\n    previousPrice: previousPrice,\n    currentPrice: currentPrice,\n    priceDifference: priceDifference,\n    percentageChange: percentageChange,\n    priceChanged: priceChanged,\n    priceReduced: priceReduced,\n    priceIncreased: priceIncreased,\n    changeDirection: priceReduced ? 'decreased' : (priceIncreased ? 'increased' : 'unchanged'),\n    savingsAmount: priceReduced ? Math.abs(priceDifference) : 0\n  }\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "024fba14-4c8a-4036-9236-a4073d7be5fb",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1040,
        -224
      ],
      "parameters": {
        "color": 6,
        "width": 220,
        "height": 460,
        "content": "## \ud83d\udd0d PRICE COMPARISON\nCalculates difference and change %"
      },
      "typeVersion": 1
    },
    {
      "id": "b209b7b7-d4ba-4b37-85f3-f11b3eac630f",
      "name": "Check if Price Reduced",
      "type": "n8n-nodes-base.if",
      "notes": "Filters only hotels where price has decreased to send alerts",
      "position": [
        -800,
        64
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "leftValue": "",
            "caseSensitive": false
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "price-reduced-check",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              },
              "leftValue": "={{ $json.priceReduced }}",
              "rightValue": true
            }
          ]
        }
      },
      "typeVersion": 2
    },
    {
      "id": "73133073-2222-4af6-9337-b572e9323058",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -832,
        -112
      ],
      "parameters": {
        "color": 5,
        "width": 220,
        "height": 332,
        "content": "## \u2705 PRICE FILTER\nIdentifies reduced prices only"
      },
      "typeVersion": 1
    },
    {
      "id": "d1c8b9af-4626-4cc5-a72c-06b5ec68a126",
      "name": "Format Alert Email",
      "type": "n8n-nodes-base.code",
      "notes": "Creates formatted HTML email with price comparison and booking details",
      "position": [
        -560,
        -32
      ],
      "parameters": {
        "jsCode": "// Format data for alert email\nconst data = $input.item.json;\n\nconst emailSubject = `\ud83c\udf89 Price Drop Alert: ${data.hotelName} - Save $${data.savingsAmount}!`;\n\nconst emailBody = `\n<html>\n<head>\n  <style>\n    body { font-family: Arial, sans-serif; line-height: 1.6; color: #333; }\n    .container { max-width: 600px; margin: 0 auto; padding: 20px; }\n    .header { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 30px; text-align: center; border-radius: 10px 10px 0 0; }\n    .content { background: #f9f9f9; padding: 30px; border-radius: 0 0 10px 10px; }\n    .price-box { background: white; padding: 20px; margin: 20px 0; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }\n    .old-price { text-decoration: line-through; color: #999; font-size: 18px; }\n    .new-price { color: #22c55e; font-size: 32px; font-weight: bold; }\n    .savings { background: #22c55e; color: white; padding: 10px 20px; border-radius: 5px; display: inline-block; margin: 10px 0; }\n    .details { margin: 20px 0; }\n    .detail-row { padding: 10px 0; border-bottom: 1px solid #eee; }\n    .label { font-weight: bold; color: #667eea; }\n    .cta-button { background: #667eea; color: white; padding: 15px 30px; text-decoration: none; border-radius: 5px; display: inline-block; margin: 20px 0; }\n    .footer { text-align: center; color: #999; margin-top: 30px; font-size: 12px; }\n  </style>\n</head>\n<body>\n  <div class=\"container\">\n    <div class=\"header\">\n      <h1>\ud83c\udfe8 Hotel Price Drop Alert!</h1>\n      <p>Great news! A price reduction has been detected</p>\n    </div>\n    <div class=\"content\">\n      <h2>${data.hotelName}</h2>\n      <p><strong>\ud83d\udccd Location:</strong> ${data.location}</p>\n      <p><strong>\ud83d\udecf\ufe0f Room Type:</strong> ${data.roomType}</p>\n      \n      <div class=\"price-box\">\n        <p><span class=\"label\">Previous Price:</span> <span class=\"old-price\">$${data.previousPrice} ${data.currency}</span></p>\n        <p><span class=\"label\">Current Price:</span> <span class=\"new-price\">$${data.currentPrice} ${data.currency}</span></p>\n        <div class=\"savings\">\ud83d\udcb0 Save $${data.savingsAmount} (${Math.abs(data.percentageChange)}% OFF)</div>\n      </div>\n      \n      <div class=\"details\">\n        <div class=\"detail-row\">\n          <span class=\"label\">Availability:</span> ${data.availability}\n        </div>\n        <div class=\"detail-row\">\n          <span class=\"label\">Price Per Night:</span> $${data.pricePerNight} ${data.currency}\n        </div>\n        <div class=\"detail-row\">\n          <span class=\"label\">Taxes:</span> ${data.taxesIncluded ? 'Included' : 'Not Included'}\n        </div>\n        <div class=\"detail-row\">\n          <span class=\"label\">Checked On:</span> ${data.checkDate}\n        </div>\n      </div>\n      \n      <center>\n        <a href=\"${data.bookingUrl}\" class=\"cta-button\">Book Now & Save!</a>\n      </center>\n      \n      <p style=\"margin-top: 20px; padding: 15px; background: #fff3cd; border-left: 4px solid #ffc107; border-radius: 4px;\">\n        \u26a0\ufe0f <strong>Act Fast!</strong> Prices can change at any time. This deal might not last long.\n      </p>\n    </div>\n    <div class=\"footer\">\n      <p>This is an automated price alert from your Hotel Price Monitoring System</p>\n      <p>You're receiving this because you're monitoring ${data.hotelName}</p>\n    </div>\n  </div>\n</body>\n</html>\n`;\n\nreturn {\n  json: {\n    ...data,\n    emailSubject: emailSubject,\n    emailBody: emailBody,\n    alertType: 'price_reduction',\n    urgencyLevel: Math.abs(data.percentageChange) > 20 ? 'high' : 'medium'\n  }\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "db1d5f57-2f0e-4b7f-82a1-b29d219dab34",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -608,
        -256
      ],
      "parameters": {
        "color": 4,
        "width": 220,
        "height": 268,
        "content": "## \ud83d\udce7 EMAIL FORMATTING\nCreates beautiful HTML alert email"
      },
      "typeVersion": 1
    },
    {
      "id": "7cfa40a4-8201-4a19-b7fa-cff35c636ffe",
      "name": "Send Email to Travel Agent",
      "type": "n8n-nodes-base.emailSend",
      "notes": "Sends price drop alert email to travel agent with all details",
      "position": [
        -352,
        -32
      ],
      "parameters": {
        "options": {},
        "subject": "={{ $json.emailSubject }}",
        "toEmail": "user@example.com",
        "fromEmail": "user@example.com"
      },
      "credentials": {
        "smtp": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "59598261-84cb-49b5-ad85-15572316d478",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -368,
        -256
      ],
      "parameters": {
        "color": 6,
        "width": 220,
        "height": 268,
        "content": "## \ud83d\udcee EMAIL DELIVERY\nSends alert to travel agent"
      },
      "typeVersion": 1
    },
    {
      "id": "01ed82a5-104f-4282-844f-faf5d4bd872a",
      "name": "Log Alert Sent",
      "type": "n8n-nodes-base.code",
      "notes": "Records alert delivery for tracking and audit purposes",
      "position": [
        -128,
        -32
      ],
      "parameters": {
        "jsCode": "// Log successful alert\nconst data = $input.item.json;\n\nreturn {\n  json: {\n    hotelId: data.hotelId,\n    hotelName: data.hotelName,\n    alertSent: true,\n    alertTimestamp: new Date().toISOString(),\n    previousPrice: data.previousPrice,\n    currentPrice: data.currentPrice,\n    savingsAmount: data.savingsAmount,\n    percentageChange: data.percentageChange,\n    recipientEmail: 'user@example.com',\n    alertType: 'price_reduction'\n  }\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "bc82882c-6e33-47ed-b91a-f1eeb426908d",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -144,
        -272
      ],
      "parameters": {
        "color": 5,
        "width": 220,
        "height": 284,
        "content": "## \ud83d\udcdd ALERT LOGGING\nRecords successful alert delivery"
      },
      "typeVersion": 1
    },
    {
      "id": "5c98bfac-f475-4f97-b359-c6d2a1b88086",
      "name": "Log No Alert Needed",
      "type": "n8n-nodes-base.code",
      "notes": "Records check where no alert was needed (price unchanged or increased)",
      "position": [
        -560,
        160
      ],
      "parameters": {
        "jsCode": "// Log no change detected\nconst data = $input.item.json;\n\nreturn {\n  json: {\n    hotelId: data.hotelId,\n    hotelName: data.hotelName,\n    alertSent: false,\n    checkTimestamp: new Date().toISOString(),\n    previousPrice: data.previousPrice,\n    currentPrice: data.currentPrice,\n    priceChanged: data.priceChanged,\n    changeDirection: data.changeDirection,\n    reason: data.priceIncreased ? 'price_increased' : 'no_change'\n  }\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "461d09c9-0695-4ac8-bd8b-6f1b732a8b32",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -752,
        304
      ],
      "parameters": {
        "color": 4,
        "width": 220,
        "height": 140,
        "content": "## \ud83d\udccb NO ALERT LOG\nRecords when prices didn't decrease"
      },
      "typeVersion": 1
    },
    {
      "id": "5c074f64-4562-4cc6-adb4-6dd9e5d07ba3",
      "name": "Merge All Logs",
      "type": "n8n-nodes-base.merge",
      "notes": "Combines logs from both alert and no-alert paths",
      "position": [
        -352,
        160
      ],
      "parameters": {
        "mode": "combine",
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "c2c40b1d-d5cd-4221-9395-54eb169a262a",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -448,
        304
      ],
      "parameters": {
        "color": 6,
        "width": 200,
        "height": 140,
        "content": "## \ud83d\udd00 LOG MERGE\nCombines all check results"
      },
      "typeVersion": 1
    },
    {
      "id": "400a11eb-2dc0-425e-a167-98312b3f8173",
      "name": "Update Price in Database",
      "type": "n8n-nodes-base.httpRequest",
      "notes": "Updates database with latest price for future comparisons",
      "position": [
        -128,
        160
      ],
      "parameters": {
        "url": "https://your-database-api.com/prices/update",
        "options": {},
        "sendBody": true,
        "sendHeaders": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "hotel_id",
              "value": "={{ $('Parse Price Data').item.json.hotelId }}"
            },
            {
              "name": "room_type",
              "value": "={{ $('Parse Price Data').item.json.roomType }}"
            },
            {
              "name": "price",
              "value": "={{ $('Parse Price Data').item.json.currentPrice }}"
            },
            {
              "name": "currency",
              "value": "={{ $('Parse Price Data').item.json.currency }}"
            },
            {
              "name": "availability",
              "value": "={{ $('Parse Price Data').item.json.availability }}"
            },
            {
              "name": "timestamp",
              "value": "={{ $('Parse Price Data').item.json.checkTimestamp }}"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "f52dff1c-b64f-4e04-9273-ed3b26074e37",
      "name": "Sticky Note12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -176,
        320
      ],
      "parameters": {
        "color": 5,
        "width": 220,
        "height": 140,
        "content": "## \ud83d\udcbe DATABASE UPDATE\nStores new price for next comparison"
      },
      "typeVersion": 1
    },
    {
      "id": "33fccfde-7e4a-464c-b056-97ef34d8e7ec",
      "name": "Create Execution Summary",
      "type": "n8n-nodes-base.code",
      "notes": "Generates summary report of price check execution and alerts sent",
      "position": [
        96,
        64
      ],
      "parameters": {
        "jsCode": "// Generate execution summary\nconst allLogs = $input.all();\n\nconst totalHotels = allLogs.length;\nconst alertsSent = allLogs.filter(item => item.json.alertSent === true).length;\nconst noAlerts = allLogs.filter(item => item.json.alertSent === false).length;\n\nconst summary = {\n  executionTimestamp: new Date().toISOString(),\n  executionDate: new Date().toLocaleDateString('en-US', { \n    year: 'numeric', \n    month: 'long', \n    day: 'numeric',\n    hour: '2-digit',\n    minute: '2-digit'\n  }),\n  totalHotelsChecked: totalHotels,\n  priceDropAlertsRaised: alertsSent,\n  noAlertsNeeded: noAlerts,\n  alertRate: totalHotels > 0 ? ((alertsSent / totalHotels) * 100).toFixed(1) + '%' : '0%',\n  status: 'completed',\n  nextCheckIn: '6 hours'\n};\n\nreturn {\n  json: summary\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "552c8be1-cda3-4a06-834d-735f11e88fbf",
      "name": "Sticky Note13",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        80,
        -112
      ],
      "parameters": {
        "color": 4,
        "width": 220,
        "height": 284,
        "content": "## \ud83d\udcca SUMMARY REPORT\nCreates execution statistics"
      },
      "typeVersion": 1
    },
    {
      "id": "f141855d-90f2-47bc-9839-c5953f12863c",
      "name": "Sticky Note14",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1600,
        -1216
      ],
      "parameters": {
        "color": 7,
        "width": 380,
        "height": 792,
        "content": "## \ud83c\udfe8 HOTEL ROOM PRICE CHECKER\n\n**Automated Price Monitoring System**\n\n**Features:**\n\u2713 Checks prices every 6 hours\n\u2713 Monitors multiple hotels\n\u2713 Detects price reductions\n\u2713 Sends instant email alerts\n\u2713 Shows old vs new prices\n\u2713 Calculates savings amount\n\u2713 Tracks price history\n\u2713 Beautiful HTML emails\n\n**Alert Triggers:**\n\u2022 Price decreased\n\u2022 Percentage savings\n\u2022 Availability changes\n\n**Email Includes:**\n\u2022 Hotel name & location\n\u2022 Room type details\n\u2022 Old price (strikethrough)\n\u2022 New price (highlighted)\n\u2022 Savings amount & %\n\u2022 Direct booking link\n\u2022 Urgency indicator\n\n**Setup Required:**\n1. Configure schedule trigger\n2. Add hotel API credentials\n3. Setup database endpoint\n4. Configure SMTP for emails\n5. Update agent email address\n6. Customize hotel list\n7. Test price comparison logic"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "c121be3a-bd75-426b-9e52-9f1859cb47c6",
  "connections": {
    "Compare Prices": {
      "main": [
        [
          {
            "node": "Check if Price Reduced",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Log Alert Sent": {
      "main": [
        [
          {
            "node": "Merge All Logs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge All Logs": {
      "main": [
        [
          {
            "node": "Update Price in Database",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Load Hotel List": {
      "main": [
        [
          {
            "node": "Fetch Current Price from API",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Price Data": {
      "main": [
        [
          {
            "node": "Get Previous Price from DB",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Alert Email": {
      "main": [
        [
          {
            "node": "Send Email to Travel Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Log No Alert Needed": {
      "main": [
        [
          {
            "node": "Merge All Logs",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Check if Price Reduced": {
      "main": [
        [
          {
            "node": "Format Alert Email",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Log No Alert Needed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule - Every 6 Hours": {
      "main": [
        [
          {
            "node": "Load Hotel List",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Price in Database": {
      "main": [
        [
          {
            "node": "Create Execution Summary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Previous Price from DB": {
      "main": [
        [
          {
            "node": "Compare Prices",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Email to Travel Agent": {
      "main": [
        [
          {
            "node": "Log Alert Sent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Current Price from API": {
      "main": [
        [
          {
            "node": "Parse Price Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}