{
  "name": "Track legal risks and litigation threats using Bright Data, OpenRouter and Google Sheets",
  "nodes": [
    {
      "id": "050ecff7-23c6-4d2a-bcd6-cdd5ce472a47",
      "name": "Start Legal Scan",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -4464,
        912
      ]
    },
    {
      "id": "b9160154-5e68-4fe3-94cb-691417f1a145",
      "name": "Scenario Configuration Loader",
      "type": "n8n-nodes-base.set",
      "position": [
        -4272,
        912
      ]
    },
    {
      "id": "0f9d0e61-cb8a-4035-82b6-135561dd63c5",
      "name": "Scenario Router – Litigation Monitoring",
      "type": "n8n-nodes-base.if",
      "position": [
        -3680,
        912
      ]
    },
    {
      "id": "e9728472-19f7-4d25-9565-b741367a36b8",
      "name": "Company × Court Matrix Expander",
      "type": "n8n-nodes-base.code",
      "position": [
        -3424,
        768
      ]
    },
    {
      "id": "abef017c-0a7d-401f-ab82-eec3318a57d7",
      "name": "Search Query & URL Builder",
      "type": "n8n-nodes-base.code",
      "position": [
        -3216,
        768
      ]
    },
    {
      "id": "ba78d6b3-798f-4bb6-88c9-c967954357d8",
      "name": "Bright Data Error Formatter",
      "type": "n8n-nodes-base.set",
      "position": [
        -2544,
        1008
      ]
    },
    {
      "id": "57df20a7-4780-4196-850c-59bb7f187175",
      "name": "Error Log – Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -2304,
        1008
      ]
    },
    {
      "id": "a40b555e-a114-41f1-ac62-a2d5989ef285",
      "name": "HTML Extractor – Titles, Links, Snippets",
      "type": "n8n-nodes-base.html",
      "position": [
        -2544,
        480
      ]
    },
    {
      "id": "965d2396-1b69-46f4-8952-52a112ac89ac",
      "name": "Search Result Normalizer",
      "type": "n8n-nodes-base.code",
      "position": [
        -2304,
        480
      ]
    },
    {
      "id": "f760a441-4287-45c4-8317-2e24af2967e8",
      "name": "Legal Signal Keyword Scorer",
      "type": "n8n-nodes-base.code",
      "position": [
        -2080,
        480
      ]
    },
    {
      "id": "1e94c83f-391d-47b2-8b30-64fda68b987a",
      "name": "AI Legal Case Classifier",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -1808,
        480
      ]
    },
    {
      "id": "0b5d3eed-3842-439a-a951-5d5dac1d151b",
      "name": "Legal Classification Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -1648,
        736
      ]
    },
    {
      "id": "297608bb-ff47-43c0-bdc8-4be1440e4ea1",
      "name": "Duplicate Legal Event Filter",
      "type": "n8n-nodes-base.removeDuplicates",
      "position": [
        -1456,
        480
      ]
    },
    {
      "id": "42dc9f84-4541-4b06-b0a9-2bea3bd5975f",
      "name": "Legal Event Normalizer & Confidence Scorer",
      "type": "n8n-nodes-base.code",
      "position": [
        -1248,
        480
      ]
    },
    {
      "id": "dfda4edd-9cdf-4097-a671-3bf35744cc0f",
      "name": "High-Risk Legal Event Gate",
      "type": "n8n-nodes-base.if",
      "position": [
        -1040,
        480
      ]
    },
    {
      "id": "fee88595-072e-418f-8c64-cfe39f5f03dc",
      "name": "Legal Correlation & Clustering Engine",
      "type": "n8n-nodes-base.code",
      "position": [
        -528,
        144
      ]
    },
    {
      "id": "41b622ae-8cce-413a-9360-5bb9d5bbebf5",
      "name": "Litigation Events Extractor",
      "type": "n8n-nodes-base.set",
      "position": [
        -128,
        -176
      ]
    },
    {
      "id": "bd9974ab-ff01-4761-b164-2c10fd90a079",
      "name": "Litigation Event Splitter",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        112,
        -176
      ]
    },
    {
      "id": "60b28130-4882-4072-8378-579da8e0e509",
      "name": "High-Risk Escalation Filter",
      "type": "n8n-nodes-base.if",
      "position": [
        320,
        -176
      ]
    },
    {
      "id": "256723e6-fb94-4ab3-96c4-16412fd839df",
      "name": "Monitoring Branch Placeholder",
      "type": "n8n-nodes-base.noOp",
      "position": [
        -528,
        880
      ]
    },
    {
      "id": "eab0f4dc-8ffb-46b7-977e-ffaeb828dab9",
      "name": "High-Risk Alerts – Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1264,
        -544
      ]
    },
    {
      "id": "bcf346b4-ba2d-4eee-912f-6e0bc125d4d5",
      "name": "High-Risk Alert Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1056,
        -304
      ]
    },
    {
      "id": "648901d4-b158-4d38-908e-6a6b57581a38",
      "name": "AI High-Risk Litigation Alert Generator",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        912,
        -544
      ]
    },
    {
      "id": "b7674cdf-319e-4912-9a30-4dd0a58397c1",
      "name": "Monitoring Event Aggregator",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        896,
        96
      ]
    },
    {
      "id": "d6cb0bc1-839e-44af-8990-de03d45c1eec",
      "name": "AI Litigation Monitoring Summary Generator",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1104,
        96
      ]
    },
    {
      "id": "5571278f-4336-4144-9d2c-4a3e4ec3b114",
      "name": "Monitoring Summary Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1248,
        320
      ]
    },
    {
      "id": "6fcc35be-516d-4a89-94d4-9b7b99ca1cb1",
      "name": "Monitoring Summary – Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1456,
        96
      ]
    },
    {
      "id": "0cd6e982-4f40-4780-ad55-900af3dd2c09",
      "name": "AI M&A Legal Exposure Analyzer",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -96,
        416
      ]
    },
    {
      "id": "27cc281d-9da8-4a20-909f-dfc090322204",
      "name": "M&A Exposure Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        80,
        656
      ]
    },
    {
      "id": "e4956878-3f1b-4aea-b5c4-76667da23bfd",
      "name": "M&A Exposure – Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        256,
        416
      ]
    },
    {
      "id": "b7b4688c-f48d-409a-bb47-9f9777d982e1",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -5248,
        96
      ],
      "parameters": {
        "width": 432,
        "height": 608,
        "content": "##  Legal Risk & Litigation Intelligence Orchestration Engine\n\nThis workflow monitors companies across courts, regulators, and jurisdictions to detect, classify, and correlate legal risk signals.\n\nIt:"
      }
    },
    {
      "id": "5fcdfe06-dbb8-4fcb-bf16-0d0b71d12c2c",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3408,
        432
      ],
      "parameters": {
        "width": 432,
        "height": 240,
        "content": "## Multi-Source Legal Data Collection\n\n- Expands companies × courts matrix\n- Generates structured search queries\n- Scrapes Google via Bright Data\n- Extracts titles, links, snippets\n- Logs scraper erro"
      }
    },
    {
      "id": "e5ae0ebd-b5a8-4868-b87d-42f10fd39412",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2192,
        128
      ],
      "parameters": {
        "width": 432,
        "height": 272,
        "content": "## Legal Signal Filtering & AI Classification\n\n- Scores keyword-based legal relevance\n- Validates real court / regulatory cases\n- Classifies legal topic & jurisdiction\n- Assigns risk level (LOW / MEDI"
      }
    },
    {
      "id": "c49c8bce-e77b-4df9-9097-be75b18750e8",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1328,
        144
      ],
      "parameters": {
        "width": 432,
        "height": 240,
        "content": "## Normalization & Confidence Scoring\n\n- Standardizes legal event structure\n- Calculates confidence score (0–100)\n- Applies court-level weighting\n- Filters high-risk escalations\n- Removes duplicate ev"
      }
    },
    {
      "id": "f0f3d817-55f8-4f27-9e9a-ff10dcf42883",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -160,
        -464
      ],
      "parameters": {
        "width": 432,
        "height": 240,
        "content": "## Correlation & Risk Clustering\n\n- Clusters by jurisdiction concentration\n- Groups events by legal topic\n- Detects litigation density patterns\n- Identifies structural exposure risks\n- Surfaces concen"
      }
    },
    {
      "id": "bef4bad2-93dc-4437-812e-2df7ac8f2156",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        912,
        -848
      ],
      "parameters": {
        "width": 432,
        "height": 240,
        "content": "## Executive Intelligence Outputs\n\nGenerates structured reports for:\n\n• High-Risk Escalation Alerts  \n• Litigation Monitoring Briefs  \n\nTransforms legal signals into board-ready decisions.\n"
      }
    },
    {
      "id": "b3e89fe8-1c3d-4df5-ba80-82ec0a675619",
      "name": "Scrape Legal Data (Bright Data)",
      "type": "@brightdata/n8n-nodes-brightdata.brightData",
      "position": [
        -2976,
        768
      ]
    },
    {
      "id": "cf7b4480-84a8-496c-b02a-efaec72a8fa5",
      "name": "Legal Case Classifier",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        -1856,
        736
      ]
    },
    {
      "id": "2acfbab9-65a4-4933-b00b-5f2579c08768",
      "name": "M&A Exposure Analyzer",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        -96,
        656
      ]
    },
    {
      "id": "78f8d967-f9dd-4226-b714-f74da673ac9d",
      "name": "Monitoring Summary Generator",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        1104,
        320
      ]
    },
    {
      "id": "194eaad8-23c8-425b-9131-155d3fce4d79",
      "name": "High-Risk Alert Generator",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        864,
        -304
      ]
    },
    {
      "id": "6d1cdb8f-c69b-4587-aa29-d3cd7d5fd569",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -5232,
        784
      ],
      "parameters": {
        "width": 512,
        "height": 480,
        "content": "## Setup Instructions\n\nBefore running this workflow, configure the following credentials in n8n:\n\n**1. Bright Data API** — Required for web scraping\n- Sign up at brightdata.com\n- Create an API token\n-"
      }
    },
    {
      "id": "ac798d90-56bf-45bf-9b17-d48f4cb7bccf",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -4080,
        608
      ],
      "parameters": {
        "width": 288,
        "height": 272,
        "content": "Customize Here\n\nEdit this node to set:\n- companies: List of companies to monitor\n- jurisdictions: Country/region focus\n- courts: Specific courts to track\n- regulators: Regulatory bodies to monitor\n- l"
      }
    },
    {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -5248,
        1200
      ],
      "parameters": {
        "width": 520,
        "height": 780,
        "content": "## Google Sheets Setup\n\nCreate a Google Spreadsheet with 4 tabs and add these column headers in row 1:\n\n**Tab: Monitoring summary**\nbrief_title | key_developments | primary_jurisdictions | concentrati"
      }
    },
    {
      "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -5248,
        2040
      ],
      "parameters": {
        "width": 400,
        "height": 280,
        "content": "## Rate Limiting Advisory\n\nThis workflow generates Company x Court/Regulator parallel web scraping requests via Bright Data.\n\nIf monitoring many companies across multiple jurisdictions, you may hit ra"
      }
    }
  ],
  "connections": {
    "Start Legal Scan": {
      "main": [
        [
          {
            "node": "Scenario Configuration Loader",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Legal Case Classifier": {
      "ai_languageModel": [
        [
          {
            "node": "AI Legal Case Classifier",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "M&A Exposure Analyzer": {
      "ai_languageModel": [
        [
          {
            "node": "AI M&A Legal Exposure Analyzer",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "AI Legal Case Classifier": {
      "main": [
        [
          {
            "node": "Duplicate Legal Event Filter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search Result Normalizer": {
      "main": [
        [
          {
            "node": "Legal Signal Keyword Scorer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "High-Risk Alert Generator": {
      "ai_languageModel": [
        [
          {
            "node": "AI High-Risk Litigation Alert Generator",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Litigation Event Splitter": {
      "main": [
        [
          {
            "node": "High-Risk Escalation Filter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "High-Risk Legal Event Gate": {
      "main": [
        [
          {
            "node": "Legal Correlation & Clustering Engine",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Monitoring Branch Placeholder",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "M&A Exposure Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "AI M&A Legal Exposure Analyzer",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Search Query & URL Builder": {
      "main": [
        [
          {
            "node": "Scrape Legal Data (Bright Data)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Bright Data Error Formatter": {
      "main": [
        [
          {
            "node": "Error Log – Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "High-Risk Escalation Filter": {
      "main": [
        [
          {
            "node": "AI High-Risk Litigation Alert Generator",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Monitoring Event Aggregator",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Legal Signal Keyword Scorer": {
      "main": [
        [
          {
            "node": "AI Legal Case Classifier",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Litigation Events Extractor": {
      "main": [
        [
          {
            "node": "Litigation Event Splitter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Monitoring Event Aggregator": {
      "main": [
        [
          {
            "node": "AI Litigation Monitoring Summary Generator",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Duplicate Legal Event Filter": {
      "main": [
        [
          {
            "node": "Legal Event Normalizer & Confidence Scorer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Monitoring Summary Generator": {
      "ai_languageModel": [
        [
          {
            "node": "AI Litigation Monitoring Summary Generator",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "High-Risk Alert Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "AI High-Risk Litigation Alert Generator",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Scenario Configuration Loader": {
      "main": [
        [
          {
            "node": "Scenario Router – Litigation Monitoring",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI M&A Legal Exposure Analyzer": {
      "main": [
        [
          {
            "node": "M&A Exposure – Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Scrape Legal Data (Bright Data)": {
      "main": [
        [
          {
            "node": "HTML Extractor – Titles, Links, Snippets",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Bright Data Error Formatter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Company × Court Matrix Expander": {
      "main": [
        [
          {
            "node": "Search Query & URL Builder",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Monitoring Summary Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "AI Litigation Monitoring Summary Generator",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Legal Classification Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "AI Legal Case Classifier",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Legal Correlation & Clustering Engine": {
      "main": [
        [
          {
            "node": "Litigation Events Extractor",
            "type": "main",
            "index": 0
          },
          {
            "node": "AI M&A Legal Exposure Analyzer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI High-Risk Litigation Alert Generator": {
      "main": [
        [
          {
            "node": "High-Risk Alerts – Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Scenario Router – Litigation Monitoring": {
      "main": [
        [
          {
            "node": "Company × Court Matrix Expander",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Litigation Monitoring Summary Generator": {
      "main": [
        [
          {
            "node": "Monitoring Summary – Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTML Extractor – Titles, Links, Snippets": {
      "main": [
        [
          {
            "node": "Search Result Normalizer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Legal Event Normalizer & Confidence Scorer": {
      "main": [
        [
          {
            "node": "High-Risk Legal Event Gate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}