{
  "name": "Compare flight prices across multiple booking platforms with email reports",
  "nodes": [
    {
      "id": "d4a5235a-57c0-42f6-9841-8f45d04dfe1c",
      "name": "Webhook - Receive Flight Request",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -1088,
        432
      ]
    },
    {
      "id": "81bb3dac-0cd3-4826-8436-573bc393f2c4",
      "name": "Parse & Validate Flight Request",
      "type": "n8n-nodes-base.code",
      "position": [
        -864,
        432
      ]
    },
    {
      "id": "3f5bb362-ca6a-4c1d-a959-9f194fcc7e99",
      "name": "Check If Request Valid",
      "type": "n8n-nodes-base.if",
      "position": [
        -640,
        432
      ]
    },
    {
      "id": "07df7d09-a38d-4540-b8f8-0e81405e086b",
      "name": "Scrape Kayak",
      "type": "n8n-nodes-base.ssh",
      "position": [
        -416,
        48
      ]
    },
    {
      "id": "2acab75d-4d75-49d7-8c37-dc36740e7636",
      "name": "Scrape Skyscanner",
      "type": "n8n-nodes-base.ssh",
      "position": [
        -416,
        240
      ]
    },
    {
      "id": "b74690a3-61b9-41df-967b-bf395fb6aade",
      "name": "Scrape Expedia",
      "type": "n8n-nodes-base.ssh",
      "position": [
        -416,
        432
      ]
    },
    {
      "id": "76e69f7a-9683-47ce-bdf0-b673c504a4b2",
      "name": "Scrape Google Flights",
      "type": "n8n-nodes-base.ssh",
      "position": [
        -416,
        816
      ]
    },
    {
      "id": "020178b1-0de8-4cbc-812d-bec95ad92d8f",
      "name": "Aggregate & Analyze Prices",
      "type": "n8n-nodes-base.code",
      "position": [
        -64,
        336
      ]
    },
    {
      "id": "b195bb98-d48b-442d-8ceb-7809a2f65d15",
      "name": "Format Email Report",
      "type": "n8n-nodes-base.code",
      "position": [
        256,
        336
      ]
    },
    {
      "id": "994f5fa6-2e45-42f7-af12-f98026250c04",
      "name": "Send Email Report",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        480,
        336
      ]
    },
    {
      "id": "8b3fbdb5-879f-4a02-8927-8632f944bd53",
      "name": "Webhook Response (Success)",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        784,
        336
      ]
    },
    {
      "id": "d1d130de-f7f2-42ed-9f2b-591446329e6c",
      "name": "Webhook Response (Error)",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        -416,
        624
      ]
    },
    {
      "id": "35dd7ec1-cb14-4b34-9138-0d8e8af2380a",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1184,
        -624
      ],
      "parameters": {
        "width": 484,
        "height": 476,
        "content": "## 🎯 Workflow Purpose\n\n**Smart Flight Price Comparison**\n\nAutomatically compares flight prices across multiple booking platforms and sends detailed reports via email.\n\n### Key Features:\n✅ Natural lang"
      }
    },
    {
      "id": "c312076a-7442-41fe-ac65-692581acde7d",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1408,
        96
      ],
      "parameters": {
        "width": 452,
        "height": 516,
        "content": "## 📥 INPUT STAGE\n\n**Webhook receives:**\n- Flight search query\n- User email\n- Alert preferences\n\n**Example:**\n```json\n{\n  \"message\": \"NYC to London March 25\",\n  \"email\": \"user@test.com\"\n}\n```"
      }
    },
    {
      "id": "f8aa3a61-314d-4b4e-83bb-477f50a7562a",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -928,
        48
      ],
      "parameters": {
        "width": 260,
        "height": 612,
        "content": "## 🧠 PARSE STAGE\n\n**Extracts:**\n- Airport codes\n- Dates (ISO format)\n- Trip type\n- Passengers\n\n**Validates:**\n- Required fields\n- Date formats\n- Airport codes"
      }
    },
    {
      "id": "32ea52fc-41ef-4f5c-bf12-c0b13b9a2866",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -508,
        -280
      ],
      "parameters": {
        "width": 280,
        "height": 1224,
        "content": "## 🔍 SCRAPE STAGE\n\n**Parallel scraping:**\n- All platforms simultaneously\n- Continue on failures\n- 30s timeout per scraper\n\n**Output format:**\nAIRLINE|PRICE|DURATION|STOPS|TIME|TIME|URL"
      }
    },
    {
      "id": "d503d1f7-06ca-4d75-96fc-b0a6d3fccb1a",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -112,
        -32
      ],
      "parameters": {
        "width": 260,
        "height": 660,
        "content": "## 📊 ANALYZE STAGE\n\n**Processes:**\n- Parse all results\n- Find best deals\n- Calculate stats\n- Sort by price\n\n**Outputs:**\n- Best overall\n- Best direct\n- Avg price\n- Savings"
      }
    },
    {
      "id": "b194c549-bdad-4f31-9ea3-5990caea9b84",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        224,
        0
      ],
      "parameters": {
        "width": 388,
        "height": 628,
        "content": "## 📧 REPORT STAGE\n\n**Email contains:**\n- Flight route & dates\n- Best deal highlight\n- Top 10 results\n- Price statistics\n- Booking links\n\n**Format:**\nPlain text (easy to read)"
      }
    },
    {
      "id": "0e963069-8538-431f-977b-9832b8905af4",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        688,
        0
      ],
      "parameters": {
        "width": 260,
        "height": 612,
        "content": "## ✅ RESPONSE STAGE\n\n**Success:**\n- Best price found\n- Airline name\n- Total results\n- Email sent confirmation\n\n**Error:**\n- Helpful message\n- What's missing\n- Example format"
      }
    }
  ],
  "connections": {
    "Scrape Kayak": {
      "main": [
        [
          {
            "node": "Aggregate & Analyze Prices",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Scrape Expedia": {
      "main": [
        [
          {
            "node": "Aggregate & Analyze Prices",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Scrape Skyscanner": {
      "main": [
        [
          {
            "node": "Aggregate & Analyze Prices",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Email Report": {
      "main": [
        [
          {
            "node": "Webhook Response (Success)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Email Report": {
      "main": [
        [
          {
            "node": "Send Email Report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Scrape Google Flights": {
      "main": [
        [
          {
            "node": "Aggregate & Analyze Prices",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check If Request Valid": {
      "main": [
        [
          {
            "node": "Scrape Kayak",
            "type": "main",
            "index": 0
          },
          {
            "node": "Scrape Skyscanner",
            "type": "main",
            "index": 0
          },
          {
            "node": "Scrape Expedia",
            "type": "main",
            "index": 0
          },
          {
            "node": "Scrape Google Flights",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Webhook Response (Error)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate & Analyze Prices": {
      "main": [
        [
          {
            "node": "Format Email Report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse & Validate Flight Request": {
      "main": [
        [
          {
            "node": "Check If Request Valid",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook - Receive Flight Request": {
      "main": [
        [
          {
            "node": "Parse & Validate Flight Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}