{
  "name": "Monitor Lis Pendens real estate filings via Telegram, BrowserAct and Gemini",
  "nodes": [
    {
      "id": "587e2c01-0dd7-4c02-9641-483580bf7221",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -160,
        656
      ]
    },
    {
      "id": "4b48e12d-ca1b-42f9-8b95-a7a87f248ed1",
      "name": "Validate user Input",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -272,
        448
      ]
    },
    {
      "id": "218e56b4-a771-4984-9a78-d09b41875b55",
      "name": "Google Gemini",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        384,
        1056
      ]
    },
    {
      "id": "18f7d5e8-7c78-44fa-9925-bcb41e43744d",
      "name": "Send Alert",
      "type": "n8n-nodes-base.telegram",
      "position": [
        448,
        288
      ]
    },
    {
      "id": "7498192b-b94d-4a33-85fc-46999779e970",
      "name": "Structured Output",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1552,
        752
      ]
    },
    {
      "id": "eadb29d1-316e-41b8-95ca-f41f5d2b287d",
      "name": "OpenRouter Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        1408,
        768
      ]
    },
    {
      "id": "9ff19cd1-665d-4f29-97b7-5e855e4817be",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        2304,
        528
      ]
    },
    {
      "id": "3064ab17-d8df-4ff7-b689-1244fd904019",
      "name": "OpenRouter Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        -304,
        672
      ]
    },
    {
      "id": "691a5056-a4c0-49c5-910c-5fa1bbe82aca",
      "name": "Check For Input Type",
      "type": "n8n-nodes-base.switch",
      "position": [
        80,
        448
      ]
    },
    {
      "id": "ae9e6c4f-3075-4f95-baf1-bc242d3c2888",
      "name": "Today's Date",
      "type": "n8n-nodes-base.dateTime",
      "position": [
        400,
        608
      ]
    },
    {
      "id": "6ae16ce2-5cc5-4a04-9c25-687e0194f8b6",
      "name": "Calculate \"To_Date\"",
      "type": "n8n-nodes-base.dateTime",
      "position": [
        448,
        432
      ]
    },
    {
      "id": "de2c6b53-dafe-459a-8190-a7a60a50b4d9",
      "name": "Calculate \"From_Date\"",
      "type": "n8n-nodes-base.dateTime",
      "position": [
        528,
        608
      ]
    },
    {
      "id": "6afda203-2e3f-4969-ae63-d7c8739d566c",
      "name": "Format To_Date to Specific Format",
      "type": "n8n-nodes-base.code",
      "position": [
        720,
        432
      ]
    },
    {
      "id": "db14cc65-787a-4c06-8ebf-301737fcff17",
      "name": "Format From_Date to Specific Format",
      "type": "n8n-nodes-base.code",
      "position": [
        720,
        608
      ]
    },
    {
      "id": "a230a29b-807a-4c53-8d9f-2013eddb7a67",
      "name": "Wait for Both Paths",
      "type": "n8n-nodes-base.merge",
      "position": [
        944,
        528
      ]
    },
    {
      "id": "580f65d5-05e2-4a46-b05a-8276647a1dff",
      "name": "Extract Lis Pendens Data",
      "type": "n8n-nodes-browseract.browserAct",
      "position": [
        1104,
        528
      ]
    },
    {
      "id": "7cdee7d5-508e-496a-a530-e8428235e552",
      "name": "Analyze Data & Format for Telegram",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1456,
        528
      ]
    },
    {
      "id": "38cbb09f-e463-4799-8355-c3a1ea91e202",
      "name": "Split Out Generated Content",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        2112,
        528
      ]
    },
    {
      "id": "3deefef0-536a-416a-ada6-b0eba12b5783",
      "name": "Prevent Rate Limits",
      "type": "n8n-nodes-base.wait",
      "position": [
        2528,
        480
      ]
    },
    {
      "id": "527a0211-c8d1-47bd-a2a2-2207e66cd7b0",
      "name": "Send Lead Data to Telegram",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2768,
        544
      ]
    },
    {
      "id": "36227764-de02-481d-b1eb-1ddb5ddbae74",
      "name": "Chatting With User",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        384,
        912
      ]
    },
    {
      "id": "e166b9cb-e91d-461e-b6a5-c8574ee29359",
      "name": "Answer the User",
      "type": "n8n-nodes-base.telegram",
      "position": [
        688,
        912
      ]
    },
    {
      "id": "6fe30f91-b082-4d8b-9649-a5b9369cc0f7",
      "name": "Documentation",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -864,
        -160
      ],
      "parameters": {
        "width": 380,
        "height": 524,
        "content": "## ⚡ Workflow Overview & Setup\n\n**Summary:** This automation monitors real estate public records (specifically Lis Pendens filings) via Telegram, using BrowserAct to scrape government databases and Ge"
      }
    },
    {
      "id": "1e17ab9d-b1ff-40f5-bdd3-fd12eadd0c44",
      "name": "Step 1 Explanation",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -448,
        240
      ],
      "parameters": {
        "width": 636,
        "height": 124,
        "content": "### 🕵️ Step 1: Input Classification\n\nThe workflow triggers via Telegram and uses an AI agent to distinguish between a casual chat and a specific real estate records request. If a data request is detec"
      }
    },
    {
      "id": "48a745ab-f345-4ad0-a28d-df7a6704ea1d",
      "name": "Step 2 Explanation",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        320,
        128
      ],
      "parameters": {
        "width": 892,
        "height": 124,
        "content": "### 🌐 Step 2: Automated Data Extraction\n\nBrowserAct executes an automated browser session to access public records databases. It inputs the generated date range and scrapes all relevant Lis Pendens fi"
      }
    },
    {
      "id": "922c16a8-1206-44a6-aa58-6d47ca222fce",
      "name": "Step 3 Explanation",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1280,
        352
      ],
      "parameters": {
        "width": 716,
        "height": 128,
        "content": "### 📊 Step 3: AI Analysis & Formatting\n\nA Data Formatting agent parses the raw JSON results, sanitizing the party names and legal text. It structures the data into scannable blocks, ensuring that each"
      }
    },
    {
      "id": "729d980d-b561-443e-a2d0-f4e7c27415b9",
      "name": "Step 4 Explanation",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2096,
        352
      ],
      "parameters": {
        "width": 840,
        "height": 120,
        "content": "### 🚀 Step 4: Final Delivery\n\nThe formatted reports are split into sequential messages and delivered to the user via Telegram. The workflow includes rate-limit prevention to ensure reliable delivery o"
      }
    },
    {
      "id": "cf443073-5c4e-4f7f-9a47-6419789c4077",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -432,
        -160
      ],
      "parameters": {
        "width": 608,
        "height": 352,
        "content": "@[youtube](Q2zUXDDhD8w)"
      }
    },
    {
      "id": "29fc46cf-7496-46ad-b770-e5d39b9abbb7",
      "name": "Step 4 Explanation1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        336,
        1168
      ],
      "parameters": {
        "width": 580,
        "height": 120,
        "content": "### 💬 Step 2-2: Conversational Fallback\n\nThis branch engages the user in natural conversation and answers them."
      }
    },
    {
      "id": "3704528b-6430-46d0-a45b-d32b8719c107",
      "name": "User Sends Message to Bot",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -432,
        448
      ]
    }
  ],
  "connections": {
    "Today's Date": {
      "main": [
        [
          {
            "node": "Calculate \"From_Date\"",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini": {
      "ai_languageModel": [
        [
          {
            "node": "Chatting With User",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Prevent Rate Limits",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenRouter Model": {
      "ai_languageModel": [
        [
          {
            "node": "Analyze Data & Format for Telegram",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Structured Output",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenRouter Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Validate user Input",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Structured Output Parser",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output": {
      "ai_outputParser": [
        [
          {
            "node": "Analyze Data & Format for Telegram",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Chatting With User": {
      "main": [
        [
          {
            "node": "Answer the User",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calculate \"To_Date\"": {
      "main": [
        [
          {
            "node": "Format To_Date to Specific Format",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prevent Rate Limits": {
      "main": [
        [
          {
            "node": "Send Lead Data to Telegram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Validate user Input": {
      "main": [
        [
          {
            "node": "Check For Input Type",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait for Both Paths": {
      "main": [
        [
          {
            "node": "Extract Lis Pendens Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check For Input Type": {
      "main": [
        [
          {
            "node": "Send Alert",
            "type": "main",
            "index": 0
          },
          {
            "node": "Calculate \"To_Date\"",
            "type": "main",
            "index": 0
          },
          {
            "node": "Today's Date",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Chatting With User",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calculate \"From_Date\"": {
      "main": [
        [
          {
            "node": "Format From_Date to Specific Format",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Lis Pendens Data": {
      "main": [
        [
          {
            "node": "Analyze Data & Format for Telegram",
            "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
          }
        ]
      ]
    },
    "Send Lead Data to Telegram": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out Generated Content": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format To_Date to Specific Format": {
      "main": [
        [
          {
            "node": "Wait for Both Paths",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Analyze Data & Format for Telegram": {
      "main": [
        [
          {
            "node": "Split Out Generated Content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format From_Date to Specific Format": {
      "main": [
        [
          {
            "node": "Wait for Both Paths",
            "type": "main",
            "index": 1
          }
        ]
      ]
    }
  }
}