{
  "name": "Validate and orchestrate lawsuit responses with OpenAI and Google Sheets",
  "nodes": [
    {
      "id": "055f2c9e-a8a6-4d17-b900-e393b717b533",
      "name": "Workflow Execution Request",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -1440,
        528
      ]
    },
    {
      "id": "c29df4e8-d8e7-47d6-9382-19c6520da4b6",
      "name": "Workflow Configuration",
      "type": "n8n-nodes-base.set",
      "position": [
        -1216,
        528
      ]
    },
    {
      "id": "44900e53-89d9-433d-8fae-86bae2942774",
      "name": "Prepare Request Data",
      "type": "n8n-nodes-base.set",
      "position": [
        -992,
        528
      ]
    },
    {
      "id": "95f44171-6b27-454a-bfa7-e2af815426f3",
      "name": "Fetch Authority Rules",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -768,
        528
      ]
    },
    {
      "id": "7a639128-c736-4c3e-abec-b64eabf005f4",
      "name": "OpenAI Model - Boundary Enforcement",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -528,
        752
      ]
    },
    {
      "id": "f8ad0d69-80b1-4ad8-b53a-94e47d2381ea",
      "name": "Validation Result Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -400,
        752
      ]
    },
    {
      "id": "251612fd-f319-4507-ba77-bdeebf623496",
      "name": "Boundary Enforcement Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -544,
        528
      ]
    },
    {
      "id": "6b6b5398-effb-4351-a019-4c4f1a37fde3",
      "name": "Check Validation Result",
      "type": "n8n-nodes-base.if",
      "position": [
        -192,
        528
      ]
    },
    {
      "id": "ef2cd065-f753-435c-8df0-a0a6e077a92c",
      "name": "Prepare Rejection Response",
      "type": "n8n-nodes-base.set",
      "position": [
        1168,
        480
      ]
    },
    {
      "id": "9b1f8879-51ad-40cb-9ab3-fb9845c6907f",
      "name": "Route by Authority Level",
      "type": "n8n-nodes-base.switch",
      "position": [
        32,
        736
      ]
    },
    {
      "id": "64f22b01-8328-4cbd-ae2c-12e6af6ade22",
      "name": "Prepare Low Authority Execution",
      "type": "n8n-nodes-base.set",
      "position": [
        256,
        512
      ]
    },
    {
      "id": "1623163b-2912-4002-a469-d278c5d4c367",
      "name": "Human Checkpoint - Medium Authority",
      "type": "n8n-nodes-base.wait",
      "position": [
        256,
        704
      ]
    },
    {
      "id": "b95ddfa6-9bbb-4e13-bc72-d835184bd034",
      "name": "Human Checkpoint - High Authority",
      "type": "n8n-nodes-base.wait",
      "position": [
        256,
        896
      ]
    },
    {
      "id": "8697ec08-f94e-4c09-a31f-cfc485545742",
      "name": "Merge Authority Paths",
      "type": "n8n-nodes-base.merge",
      "position": [
        480,
        688
      ]
    },
    {
      "id": "cb855307-f59d-4a4d-aa67-dc27e5436acc",
      "name": "OpenAI Model - Orchestration",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        752,
        912
      ]
    },
    {
      "id": "24a845ad-9440-40fe-af6f-2080eee58e4d",
      "name": "Execution Plan Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1120,
        944
      ]
    },
    {
      "id": "6c6f9744-1f59-4be0-973b-83aee3c8c696",
      "name": "HTTP Tool - Dynamic Actions",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        912,
        912
      ]
    },
    {
      "id": "f09b532a-b63c-42c9-ad20-633b200b999e",
      "name": "Orchestration Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        768,
        704
      ]
    },
    {
      "id": "9acedcd2-7ef2-412f-bca0-350f0a0471de",
      "name": "Log to Audit Trail",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1168,
        704
      ]
    },
    {
      "id": "0b771067-1931-4cfc-a86b-15ed1bb68bb3",
      "name": "Prepare Final Response",
      "type": "n8n-nodes-base.set",
      "position": [
        1392,
        704
      ]
    },
    {
      "id": "0d1439c4-5b3d-4753-bab2-cd21465e6ec8",
      "name": "Merge All Outcomes",
      "type": "n8n-nodes-base.merge",
      "position": [
        1616,
        528
      ]
    },
    {
      "id": "e20250e8-7ad1-41f3-91b6-b36a411f4da9",
      "name": "Return Response",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        1840,
        528
      ]
    },
    {
      "id": "f2b5049c-48cb-4e18-8ed4-bc7b81a721bb",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1504,
        352
      ],
      "parameters": {
        "width": 1264,
        "height": 704,
        "content": "## Validates incoming lawsuit data against compliance requirements and boundary rules\n**Why:** Ensures data integrity before initiating costly legal response processes"
      }
    },
    {
      "id": "7c4883f9-737a-4489-93f4-c40a514445fb",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        0
      ],
      "parameters": {
        "width": 592,
        "height": 320,
        "content": "## Prerequisites\nOpenAI or Nvidia API credentials for validation processing, Google Sheets access for orchestration logging\n## Use Cases\nGovernment litigation departments managing multi-level approval"
      }
    },
    {
      "id": "5abffc9f-4302-470b-a5e4-51a972d7515b",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -688,
        64
      ],
      "parameters": {
        "width": 656,
        "height": 256,
        "content": "## Setup Steps\n1. Configure Workflow Execution Webhook trigger endpoint\n2. Connect Workflow Configuration node with workflow parameters  \n3. Set up Prepare Request Data node with lawsuit data structur"
      }
    },
    {
      "id": "19d587f6-b32a-4b9e-8e57-362ea0765313",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1488,
        48
      ],
      "parameters": {
        "width": 768,
        "height": 272,
        "content": "## How It Works\nThis workflow automates the complex process of managing lawsuit responses through intelligent task validation and multi-authority coordination. Designed for legal departments, complian"
      }
    },
    {
      "id": "e131c6af-c4e5-477a-a766-d4ce0fb2bacf",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -224,
        352
      ],
      "parameters": {
        "width": 928,
        "height": 704,
        "content": "## Routes cases to appropriate human authority based on validation results and organizational hierarchy\n**Why:** Ensures proper oversight by qualified personnel matching case complexity"
      }
    },
    {
      "id": "94e490d5-84a6-43de-b98d-1839b9c2f906",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        720,
        288
      ],
      "parameters": {
        "width": 1296,
        "height": 848,
        "content": "## Generates orchestration reports and prepares final lawsuit responses with execution plans\n**Why:** Creates audit-ready documentation while automating response assembly for timely submission"
      }
    }
  ],
  "connections": {
    "Merge All Outcomes": {
      "main": [
        [
          {
            "node": "Return Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Execution Plan Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Orchestration Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Merge Authority Paths": {
      "main": [
        [
          {
            "node": "Orchestration Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Final Response": {
      "main": [
        [
          {
            "node": "Merge All Outcomes",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Workflow Configuration": {
      "main": [
        [
          {
            "node": "Prepare Request Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Validation Result": {
      "main": [
        [
          {
            "node": "Route by Authority Level",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Prepare Rejection Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route by Authority Level": {
      "main": [
        [
          {
            "node": "Prepare Low Authority Execution",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Human Checkpoint - Medium Authority",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Human Checkpoint - High Authority",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Validation Result Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Boundary Enforcement Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Boundary Enforcement Agent": {
      "main": [
        [
          {
            "node": "Check Validation Result",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Rejection Response": {
      "main": [
        [
          {
            "node": "Merge All Outcomes",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Workflow Execution Request": {
      "main": [
        [
          {
            "node": "Workflow Configuration",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Model - Orchestration": {
      "ai_languageModel": [
        [
          {
            "node": "Orchestration Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Low Authority Execution": {
      "main": [
        [
          {
            "node": "Merge Authority Paths",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Human Checkpoint - High Authority": {
      "main": [
        [
          {
            "node": "Merge Authority Paths",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "Human Checkpoint - Medium Authority": {
      "main": [
        [
          {
            "node": "Merge Authority Paths",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "OpenAI Model - Boundary Enforcement": {
      "ai_languageModel": [
        [
          {
            "node": "Boundary Enforcement Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  }
}