{
  "name": "Analyze legal contracts with GPT-4.1 and manage cases in Google Sheets and Slack",
  "nodes": [
    {
      "id": "c998dd51-6432-4039-b99c-2ff388868e14",
      "name": "Case/Contract Intake Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -80,
        80
      ]
    },
    {
      "id": "bbe71f9f-4925-4cba-9527-ff8c852752bb",
      "name": "Workflow Configuration",
      "type": "n8n-nodes-base.set",
      "position": [
        144,
        80
      ]
    },
    {
      "id": "4f8f41aa-c559-4ddd-8e0b-125aae55d200",
      "name": "Normalize Client and Case Info",
      "type": "n8n-nodes-base.set",
      "position": [
        368,
        80
      ]
    },
    {
      "id": "74134bf8-d70b-4cff-b7fa-a8800dedc3da",
      "name": "Extract Contract Text",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        592,
        80
      ]
    },
    {
      "id": "1890862e-dbe8-477a-982c-395fa6bc85c6",
      "name": "Analyze Contract and Extract Clauses",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        816,
        80
      ]
    },
    {
      "id": "83e81479-381a-4066-8cb5-2ad46d84a7c4",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        824,
        304
      ]
    },
    {
      "id": "68d21fb0-1b9a-4063-8a1f-4dafb596787d",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        952,
        304
      ]
    },
    {
      "id": "b0db167d-b191-4dcb-93e7-816cba2dca26",
      "name": "Route by Case Type",
      "type": "n8n-nodes-base.switch",
      "position": [
        1168,
        48
      ]
    },
    {
      "id": "7aab1556-bc98-4c48-b6da-17c0b5746dc7",
      "name": "Log Case and Contract Info",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1392,
        80
      ]
    },
    {
      "id": "dfe0a096-470c-4e83-b8bd-c9ed142889d9",
      "name": "Notify Responsible Attorney",
      "type": "n8n-nodes-base.slack",
      "position": [
        1616,
        80
      ]
    },
    {
      "id": "96ec7424-958d-4e8e-bc81-883d6c8a55bb",
      "name": "Send Summary to Client",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        1840,
        80
      ]
    },
    {
      "id": "7b5f569d-9e8f-4be7-92d9-c60b585219c5",
      "name": "Generate Contract Review PDF",
      "type": "n8n-nodes-base.convertToFile",
      "position": [
        2064,
        80
      ]
    },
    {
      "id": "be862047-165e-4656-8f03-d568b2377997",
      "name": "Schedule Case Follow-ups",
      "type": "n8n-nodes-base.googleCalendar",
      "position": [
        2288,
        80
      ]
    },
    {
      "id": "79743dc1-5fbf-4c3f-b8e5-772e8d9b9e00",
      "name": "Integrate with Practice Management Software",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2512,
        80
      ]
    },
    {
      "id": "f7c7ecc9-e8df-4975-b0af-08c08c41d572",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -112,
        -112
      ],
      "parameters": {
        "width": 640,
        "height": 656,
        "content": "## Webhook & Config"
      }
    },
    {
      "id": "bb68c09f-2974-4d5a-97b0-7eccdbbff188",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        560,
        -112
      ],
      "parameters": {
        "width": 768,
        "height": 656,
        "content": "## AI logic & Routing"
      }
    },
    {
      "id": "c674885e-db6f-4fe0-99fc-9f6acc8a4094",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1344,
        -112
      ],
      "parameters": {
        "width": 864,
        "height": 656,
        "content": "## Log & Notify"
      }
    },
    {
      "id": "50377225-f278-4be5-8a07-b8125009a67c",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2240,
        -112
      ],
      "parameters": {
        "width": 432,
        "height": 656,
        "content": "## Scheduling "
      }
    },
    {
      "id": "efc1d1c9-efb0-4bac-a064-265f2881ab78",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -464,
        -112
      ],
      "parameters": {
        "width": 336,
        "height": 560,
        "content": "## Main\nAutomates law firm case and contract management. AI extracts key contract clauses, routes cases to appropriate attorneys, logs details, sends client summaries, and schedules follow-ups.\n\n## Se"
      }
    }
  ],
  "connections": {
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Analyze Contract and Extract Clauses",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Route by Case Type": {
      "main": [
        [
          {
            "node": "Log Case and Contract Info",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Contract Text": {
      "main": [
        [
          {
            "node": "Analyze Contract and Extract Clauses",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Summary to Client": {
      "main": [
        [
          {
            "node": "Generate Contract Review PDF",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Workflow Configuration": {
      "main": [
        [
          {
            "node": "Normalize Client and Case Info",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Case Follow-ups": {
      "main": [
        [
          {
            "node": "Integrate with Practice Management Software",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Analyze Contract and Extract Clauses",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Log Case and Contract Info": {
      "main": [
        [
          {
            "node": "Notify Responsible Attorney",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Notify Responsible Attorney": {
      "main": [
        [
          {
            "node": "Send Summary to Client",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Case/Contract Intake Webhook": {
      "main": [
        [
          {
            "node": "Workflow Configuration",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Contract Review PDF": {
      "main": [
        [
          {
            "node": "Schedule Case Follow-ups",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize Client and Case Info": {
      "main": [
        [
          {
            "node": "Extract Contract Text",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Analyze Contract and Extract Clauses": {
      "main": [
        [
          {
            "node": "Route by Case Type",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}