{
  "name": "Find cheap flight deals using Google Gemini, GPT-4, Telegram and BrowserAct",
  "nodes": [
    {
      "id": "ae57867e-ffbe-4188-9955-00725cc17f51",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -720,
        496
      ]
    },
    {
      "id": "f295c258-781c-46c1-8338-639dcc26b08c",
      "name": "Validate user Input",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -848,
        272
      ]
    },
    {
      "id": "8c74bb74-24e8-450a-9875-a4682abcc710",
      "name": "Validate user Inputs",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -848,
        496
      ]
    },
    {
      "id": "c184ff93-0aed-445e-8ec4-1a66a91d542b",
      "name": "Google Gemini",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -128,
        736
      ]
    },
    {
      "id": "0dd6095d-a693-46ba-8e77-a83476b97b34",
      "name": "Structured Output",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        624,
        512
      ]
    },
    {
      "id": "527af11f-88b2-4a44-abe0-4bad44ced719",
      "name": "OpenRouter Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        512,
        512
      ]
    },
    {
      "id": "995ebd6f-dc22-4b8b-a585-1b4c803b3224",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        976,
        304
      ]
    },
    {
      "id": "33b7eab4-658a-4e92-a22f-e49dc66fe069",
      "name": "Chatting With User",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -128,
        576
      ]
    },
    {
      "id": "71544b37-f48b-4c7a-babc-d3ce7ad62e5a",
      "name": "Answer the User",
      "type": "n8n-nodes-base.telegram",
      "position": [
        176,
        576
      ]
    },
    {
      "id": "f04821b9-be4a-4de0-bc7c-c1b23a339ed1",
      "name": "Check For Input Type",
      "type": "n8n-nodes-base.switch",
      "position": [
        -496,
        256
      ]
    },
    {
      "id": "b4d78d2d-bc32-4dd0-8465-67cef4ae2c45",
      "name": "User Sends Message to Bot",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -1024,
        272
      ]
    },
    {
      "id": "9f86f90d-26a1-4602-befe-417292fe1fb7",
      "name": "Process Initialization Alert",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -48,
        144
      ]
    },
    {
      "id": "ea9f17c3-584d-4b26-ab22-799d95a65133",
      "name": "Run \"Low-Const Travel Finder\" workflow",
      "type": "n8n-nodes-browseract.browserAct",
      "position": [
        -48,
        304
      ]
    },
    {
      "id": "32fd8b4f-fded-4992-9e7d-560018c4524d",
      "name": "Analyze Data & Generate Response",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        512,
        304
      ]
    },
    {
      "id": "1121479f-7036-42e7-9d25-c09a4d654888",
      "name": "Split Out Generated Data",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        784,
        304
      ]
    },
    {
      "id": "9b67af05-9df4-492b-bce2-ff78db51285c",
      "name": "Avoid Rate Limits",
      "type": "n8n-nodes-base.wait",
      "position": [
        1184,
        272
      ]
    },
    {
      "id": "e930941e-30b9-44c8-8f72-b7537eeb39c7",
      "name": "Send Travel List to User",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1408,
        304
      ]
    },
    {
      "id": "4e6d66e5-1774-4c8d-a540-4de1f46a722c",
      "name": "Step 1 Explanation",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1024,
        96
      ],
      "parameters": {
        "width": 636,
        "height": 124,
        "content": "### 🕵️ Step 1: Intent Analysis\n\nThe workflow begins by validating user input via Telegram. It identifies if the user is asking for travel deals, checks for a specified departure location, or is simply"
      }
    },
    {
      "id": "1df5d09d-e4df-4b26-bcc8-68396cb9ba60",
      "name": "Step 2 Explanation",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -224,
        0
      ],
      "parameters": {
        "width": 572,
        "height": 124,
        "content": "### ✈️ Step 2: Automated Deal Scrape\n\nOnce a location is validated, BrowserAct automates a browser session on travel sites like Momondo to find the lowest prices. The system immediately notifies the u"
      }
    },
    {
      "id": "ac2ca358-88c2-4cf4-8b0a-8fc2bf044565",
      "name": "Step 3 Explanation",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        512,
        144
      ],
      "parameters": {
        "width": 1036,
        "height": 108,
        "content": "### 📊 Step 3: AI Curation & Delivery\n\nAn AI agent processes the raw flight data, sorts it by price, and generates a scannable HTML report. Large lists are automatically split to respect Telegram limit"
      }
    },
    {
      "id": "36e9af59-8ec3-44b1-b60b-dc453e0de9c5",
      "name": "Step 4 Explanation",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -192,
        864
      ],
      "parameters": {
        "width": 580,
        "height": 120,
        "content": "### 💬 Step 2-2: Conversational Fallback\n\nIf no link is present in the user's message, this branch engages the user in natural conversation or prompts them to provide a URL for processing."
      }
    },
    {
      "id": "b0451bb6-bd86-4b93-b558-ddf256df1297",
      "name": "Documentation",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1440,
        -304
      ],
      "parameters": {
        "width": 380,
        "height": 520,
        "content": "## ⚡ Workflow Overview & Setup\n\n**Summary:** This automation extracts the departure city from Telegram messages and uses BrowserAct to scrape travel sites for the cheapest flight deals, delivering a f"
      }
    },
    {
      "id": "48ec5d58-e69e-4e36-8d4e-42404e61381a",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1024,
        -304
      ],
      "parameters": {
        "width": 624,
        "height": 368,
        "content": "@[youtube](W4EYza-Te5w)"
      }
    }
  ],
  "connections": {
    "Google Gemini": {
      "ai_languageModel": [
        [
          {
            "node": "Chatting With User",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Avoid Rate Limits",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenRouter Model": {
      "ai_languageModel": [
        [
          {
            "node": "Analyze Data & Generate Response",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Structured Output",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Avoid Rate Limits": {
      "main": [
        [
          {
            "node": "Send Travel List to User",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output": {
      "ai_outputParser": [
        [
          {
            "node": "Analyze Data & Generate Response",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Chatting With User": {
      "main": [
        [
          {
            "node": "Answer the User",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Validate user Input": {
      "main": [
        [
          {
            "node": "Check For Input Type",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check For Input Type": {
      "main": [
        [
          {
            "node": "Process Initialization Alert",
            "type": "main",
            "index": 0
          },
          {
            "node": "Run \"Low-Const Travel Finder\" workflow",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Chatting With User",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Chatting With User",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Validate user Inputs": {
      "ai_languageModel": [
        [
          {
            "node": "Validate user Input",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Structured Output Parser",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Send Travel List to User": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out Generated Data": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Validate user Input",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "User Sends Message to Bot": {
      "main": [
        [
          {
            "node": "Validate user Input",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Analyze Data & Generate Response": {
      "main": [
        [
          {
            "node": "Split Out Generated Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Run \"Low-Const Travel Finder\" workflow": {
      "main": [
        [
          {
            "node": "Analyze Data & Generate Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}