{
  "name": "Review PDF contract risks with a form, Google Gemini, Sheets, and Slack",
  "nodes": [
    {
      "id": "d5b2ad9a-1c1e-4956-a8ff-b4005fed52c7",
      "name": "Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -272,
        -224
      ],
      "parameters": {
        "width": 368,
        "height": 704,
        "content": "## Contract Review Workflow\n\n### How it works\n1. Upload a PDF contract through the form\n2. The Code node extracts text from the uploaded PDF\n3. Google Gemini analyzes the contract for risky clauses, u"
      }
    },
    {
      "id": "a3a133d1-061c-44bc-94e6-77fbe5528d2f",
      "name": "Note - PDF Processing",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        112,
        -224
      ],
      "parameters": {
        "width": 396,
        "height": 500,
        "content": "## PDF processing\nExtracts raw text from the uploaded PDF for AI analysis."
      }
    },
    {
      "id": "8e3153ed-2580-40f4-af48-a2e521293930",
      "name": "Note - AI Analysis",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        528,
        -224
      ],
      "parameters": {
        "width": 488,
        "height": 508,
        "content": "## AI risk analysis\nGemini reviews each clause and assigns a risk score from 1-10."
      }
    },
    {
      "id": "65263858-a89b-41de-a6b1-5f90fd5b2b95",
      "name": "Note - Logging",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1040,
        -224
      ],
      "parameters": {
        "width": 620,
        "height": 500,
        "content": "## Logging and alerts\nAll reviews go to Sheets. High-risk contracts get a Slack notification."
      }
    },
    {
      "id": "06fb1897-5f8d-4eab-bb53-684582da640a",
      "name": "Upload Contract Form",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        176,
        -16
      ]
    },
    {
      "id": "4c908457-c16b-418b-bc34-2b228d21c7ff",
      "name": "Extract PDF Text",
      "type": "n8n-nodes-base.code",
      "position": [
        384,
        -16
      ]
    },
    {
      "id": "f1487b81-b65b-4c10-841d-b32ea35cdfa0",
      "name": "Analyze Contract",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        576,
        -16
      ]
    },
    {
      "id": "a6fa7536-c898-4900-9057-ad784af49ffc",
      "name": "Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        576,
        144
      ]
    },
    {
      "id": "effde126-da6a-48b5-9e3f-997c63df27d4",
      "name": "Parse Risk Results",
      "type": "n8n-nodes-base.code",
      "position": [
        864,
        -16
      ]
    },
    {
      "id": "d51306c3-a9ce-4438-998c-799b5629c9b3",
      "name": "Log Review to Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1088,
        -16
      ]
    },
    {
      "id": "04fc4e89-b564-48df-8b7b-afc5eec9d2e3",
      "name": "Check Risk Level",
      "type": "n8n-nodes-base.if",
      "position": [
        1264,
        -16
      ]
    },
    {
      "id": "898cf735-8109-47ad-9a24-c3d0b6b99714",
      "name": "Send Risk Alert",
      "type": "n8n-nodes-base.slack",
      "position": [
        1472,
        -32
      ]
    }
  ],
  "connections": {
    "Analyze Contract": {
      "main": [
        [
          {
            "node": "Parse Risk Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Risk Level": {
      "main": [
        [
          {
            "node": "Send Risk Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract PDF Text": {
      "main": [
        [
          {
            "node": "Analyze Contract",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Analyze Contract",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Parse Risk Results": {
      "main": [
        [
          {
            "node": "Log Review to Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Log Review to Sheets": {
      "main": [
        [
          {
            "node": "Check Risk Level",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload Contract Form": {
      "main": [
        [
          {
            "node": "Extract PDF Text",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}