{
  "name": "Audit contract governance risk with OpenAI, Slack and email routing",
  "nodes": [
    {
      "id": "65491d32-9b58-43b8-b606-efe6e6b2bfe7",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -32,
        192
      ]
    },
    {
      "id": "1b79bdde-4cd1-417c-96b1-79fac68e045a",
      "name": "Workflow Configuration",
      "type": "n8n-nodes-base.set",
      "position": [
        192,
        192
      ]
    },
    {
      "id": "34698cc1-8aa1-43ff-bf37-d9600a6823ab",
      "name": "Simulate Contract Audit Data",
      "type": "n8n-nodes-base.code",
      "position": [
        416,
        192
      ]
    },
    {
      "id": "f3d7b5cc-014c-4531-9cda-6183a1c45e85",
      "name": "Contract Validation Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        640,
        192
      ]
    },
    {
      "id": "2c1248fa-e50a-49f1-8f6f-db40c7e1e0a7",
      "name": "OpenAI Chat Model - Validation",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        544,
        416
      ]
    },
    {
      "id": "64531d28-8d08-46fb-98cc-a14196250eae",
      "name": "Structured Output Parser - Validation",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        768,
        416
      ]
    },
    {
      "id": "c46ccd21-7e58-4f2b-8bce-272ef5d64019",
      "name": "Governance Orchestrator Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1408,
        192
      ]
    },
    {
      "id": "436c27da-1c0e-4cdb-b885-1e73adf979a7",
      "name": "OpenAI Chat Model - Governance",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        992,
        416
      ]
    },
    {
      "id": "693944b4-0d64-49b3-99a0-5ce8c0b2e7fe",
      "name": "Structured Output Parser - Governance",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1824,
        416
      ]
    },
    {
      "id": "6c2d5dfc-076f-4e3e-a29a-6c89ba803d36",
      "name": "Risk Assessment Agent Tool",
      "type": "@n8n/n8n-nodes-langchain.agentTool",
      "position": [
        1120,
        416
      ]
    },
    {
      "id": "47c6aa74-187f-4464-a99d-8c86f621a2eb",
      "name": "OpenAI Chat Model - Risk",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1072,
        624
      ]
    },
    {
      "id": "f5e69b47-fec9-4085-a6f8-5f6143e81c1a",
      "name": "Structured Output Parser - Risk",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1232,
        640
      ]
    },
    {
      "id": "1875dcc6-48ad-4713-860a-1d25af8226de",
      "name": "Compliance Checker Agent Tool",
      "type": "@n8n/n8n-nodes-langchain.agentTool",
      "position": [
        1408,
        416
      ]
    },
    {
      "id": "043a410b-ea8d-4928-be7b-46b9164052fe",
      "name": "OpenAI Chat Model - Compliance",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1408,
        624
      ]
    },
    {
      "id": "9c42b638-1cbc-4a55-94cb-6eab49307f6d",
      "name": "Structured Output Parser - Compliance",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1648,
        640
      ]
    },
    {
      "id": "68dd851f-231e-41b1-b61c-463f7dd9a8b9",
      "name": "Calculator Tool",
      "type": "@n8n/n8n-nodes-langchain.toolCalculator",
      "position": [
        1696,
        416
      ]
    },
    {
      "id": "6ef9de90-0933-418c-979b-4648dda63e8f",
      "name": "Route by Risk Level",
      "type": "n8n-nodes-base.switch",
      "position": [
        2032,
        256
      ]
    },
    {
      "id": "44dba0c6-8852-4878-9f7c-0baf8e2ad3f6",
      "name": "Prepare Low Risk Notification",
      "type": "n8n-nodes-base.set",
      "position": [
        2560,
        144
      ]
    },
    {
      "id": "6dc0e360-95c8-4415-b9b3-caa5ac25423c",
      "name": "Prepare Medium Risk Notification",
      "type": "n8n-nodes-base.set",
      "position": [
        2336,
        336
      ]
    },
    {
      "id": "923b57d9-172a-4515-aec8-14550a3c99ac",
      "name": "Prepare High Risk Notification",
      "type": "n8n-nodes-base.set",
      "position": [
        2336,
        528
      ]
    },
    {
      "id": "336fb97d-628b-4591-a822-d7c52c979552",
      "name": "Send Slack Notification",
      "type": "n8n-nodes-base.slack",
      "position": [
        2560,
        336
      ]
    },
    {
      "id": "26a54e9a-565b-4b88-9bc2-315338a5f015",
      "name": "Send Email Escalation",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        2560,
        528
      ]
    },
    {
      "id": "6068184b-bcc3-402b-97a3-0f64a71bbe37",
      "name": "Merge Notifications",
      "type": "n8n-nodes-base.merge",
      "position": [
        2784,
        240
      ]
    },
    {
      "id": "f0ac2eae-85b2-4b90-ba8a-78202c29a01f",
      "name": "Log Audit Trail",
      "type": "n8n-nodes-base.code",
      "position": [
        3008,
        240
      ]
    },
    {
      "id": "8e023136-2b83-48be-b2f8-d51aeeaaab78",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1232,
        -384
      ],
      "parameters": {
        "width": 640,
        "height": 368,
        "content": "## Prerequisites\n- Slack workspace with bot token\n- Gmail or SMTP credentials\n- Basic n8n workflow knowledge\n## Use Cases\n- Automated periodic contract risk auditing for procurement teams\n- Compliance"
      }
    },
    {
      "id": "29ef40a9-ed6c-4bc4-aad6-60b334d86f92",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        736,
        -272
      ],
      "parameters": {
        "width": 416,
        "height": 256,
        "content": "## Setup Steps\n1. Set schedule trigger interval to match audit frequency requirements.\n2. Add OpenAI API credentials to all OpenAI Chat Model nodes.\n3. Configure Slack credentials and set target chann"
      }
    },
    {
      "id": "f3d22c16-0e96-44f9-8697-57b1d2aa8697",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        48,
        -272
      ],
      "parameters": {
        "width": 624,
        "height": 240,
        "content": "## How It Works\nThis workflow automates contract governance auditing by deploying a multi-agent AI system that validates contracts, assesses risk, checks compliance, and routes alerts based on risk le"
      }
    },
    {
      "id": "35852849-21a2-4dba-9bba-2fd27f88e197",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -80,
        48
      ],
      "parameters": {
        "width": 1008,
        "height": 784,
        "content": "## Contract Validation Agent\n**What** – Validates contract data using OpenAI with structured output parsing.\n**Why** – Ensures only well-formed, complete contracts proceed to governance review."
      }
    },
    {
      "id": "e0ecff6d-181a-4d67-a97c-ffd03ce0e704",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1952,
        48
      ],
      "parameters": {
        "width": 304,
        "height": 784,
        "content": "## Route by Risk Level\n**What** – Directs flow to low, medium, or high-risk notification paths.\n**Why** – Ensures proportionate responses without manual intervention."
      }
    },
    {
      "id": "9ff81781-2fc2-4af3-b291-f8e1f11731c1",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        944,
        48
      ],
      "parameters": {
        "width": 992,
        "height": 784,
        "content": "## Governance Orchestration Agent\n**What** – Delegates to Risk Assessment and Compliance Checker sub-agents.\n**Why** – Centralises governance logic for modular, maintainable risk processing."
      }
    },
    {
      "id": "6bd6ec7b-2920-4995-8e95-47a5a5d54926",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2288,
        48
      ],
      "parameters": {
        "width": 928,
        "height": 768,
        "content": "## Notifications, Escalation & Audit Trail\n**What** – Sends Slack alerts or escalation emails based on risk level\n**Why** – Ensures urgent findings are delivered immediately to the appropriate stakeho"
      }
    }
  ],
  "connections": {
    "Calculator Tool": {
      "ai_tool": [
        [
          {
            "node": "Governance Orchestrator Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Workflow Configuration",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Notifications": {
      "main": [
        [
          {
            "node": "Log Audit Trail",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route by Risk Level": {
      "main": [
        [
          {
            "node": "Prepare Low Risk Notification",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Prepare Medium Risk Notification",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Prepare High Risk Notification",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Workflow Configuration": {
      "main": [
        [
          {
            "node": "Simulate Contract Audit Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Slack Notification": {
      "main": [
        [
          {
            "node": "Merge Notifications",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "OpenAI Chat Model - Risk": {
      "ai_languageModel": [
        [
          {
            "node": "Risk Assessment Agent Tool",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Contract Validation Agent": {
      "main": [
        [
          {
            "node": "Governance Orchestrator Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Risk Assessment Agent Tool": {
      "ai_tool": [
        [
          {
            "node": "Governance Orchestrator Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Simulate Contract Audit Data": {
      "main": [
        [
          {
            "node": "Contract Validation Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Compliance Checker Agent Tool": {
      "ai_tool": [
        [
          {
            "node": "Governance Orchestrator Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Governance Orchestrator Agent": {
      "main": [
        [
          {
            "node": "Route by Risk Level",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Low Risk Notification": {
      "main": [
        [
          {
            "node": "Merge Notifications",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model - Compliance": {
      "ai_languageModel": [
        [
          {
            "node": "Compliance Checker Agent Tool",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model - Governance": {
      "ai_languageModel": [
        [
          {
            "node": "Governance Orchestrator Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model - Validation": {
      "ai_languageModel": [
        [
          {
            "node": "Contract Validation Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Prepare High Risk Notification": {
      "main": [
        [
          {
            "node": "Send Email Escalation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser - Risk": {
      "ai_outputParser": [
        [
          {
            "node": "Risk Assessment Agent Tool",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Medium Risk Notification": {
      "main": [
        [
          {
            "node": "Send Slack Notification",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser - Compliance": {
      "ai_outputParser": [
        [
          {
            "node": "Compliance Checker Agent Tool",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser - Governance": {
      "ai_outputParser": [
        [
          {
            "node": "Governance Orchestrator Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser - Validation": {
      "ai_outputParser": [
        [
          {
            "node": "Contract Validation Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    }
  }
}