AutomationFlowsAI & RAG › Monitor and Enforce Seller Compliance with Gpt-4o, Email Alerts and Slack

Monitor and Enforce Seller Compliance with Gpt-4o, Email Alerts and Slack

ByCheng Siong Chin @cschin on n8n.io

This workflow automates regulatory compliance monitoring and policy violation detection for enterprises managing complex governance requirements. Designed for compliance officers, legal teams, and risk management departments, it addresses the challenge of continuous policy…

Cron / scheduled trigger★★★★☆ complexityAI-powered28 nodesAgentOpenAI ChatOutput Parser StructuredEmail SendSlack
AI & RAG Trigger: Cron / scheduled Nodes: 28 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow corresponds to n8n.io template #13311 — we link there as the canonical source.

This workflow follows the Agent → Emailsend recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "y8uxS3ecpYrikVkx_yIg6",
  "name": "AI-Powered Seller Compliance and Governance Enforcement System",
  "tags": [],
  "nodes": [
    {
      "id": "ea5da605-7607-47b8-a8dd-2fdd5baff0d0",
      "name": "Schedule Compliance Check",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -608,
        272
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 9
            }
          ]
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "0bcf6b05-4cf2-4241-9ed2-1595eeaa74b2",
      "name": "Workflow Configuration",
      "type": "n8n-nodes-base.set",
      "position": [
        -384,
        272
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "id-1",
              "name": "complianceThresholdWarning",
              "type": "number",
              "value": 70
            },
            {
              "id": "id-2",
              "name": "complianceThresholdReview",
              "type": "number",
              "value": 50
            },
            {
              "id": "id-3",
              "name": "complianceThresholdSuspension",
              "type": "number",
              "value": 30
            },
            {
              "id": "id-4",
              "name": "complianceTeamSlackChannel",
              "type": "string",
              "value": "<__PLACEHOLDER_VALUE__Compliance Team Slack Channel ID__>"
            },
            {
              "id": "id-5",
              "name": "complianceTeamEmail",
              "type": "string",
              "value": "<__PLACEHOLDER_VALUE__Compliance Team Email Address__>"
            },
            {
              "id": "id-6",
              "name": "fromEmail",
              "type": "string",
              "value": "<__PLACEHOLDER_VALUE__System From Email Address__>"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "8af11fe2-a097-42ff-a627-f3f92b6d6c18",
      "name": "Generate Seller Compliance Data",
      "type": "n8n-nodes-base.code",
      "position": [
        -160,
        272
      ],
      "parameters": {
        "jsCode": "// Generate sample seller compliance data\nconst sellers = [\n  {\n    sellerId: \"SELL-001\",\n    sellerName: \"Premium Electronics Co\",\n    sellerEmail: \"user@example.com\",\n    complianceScore: 95,\n    violationCount: 1,\n    lastViolationDate: \"2024-01-15\",\n    violationType: \"Late Shipment\",\n    orderFulfillmentRate: 98.5,\n    customerComplaintRate: 2.1,\n    returnRate: 5.3,\n    responseTime: 4.2,\n    accountAge: 36,\n    totalOrders: 15420\n  },\n  {\n    sellerId: \"SELL-002\",\n    sellerName: \"Fashion Trends Ltd\",\n    sellerEmail: \"user@example.com\",\n    complianceScore: 72,\n    violationCount: 5,\n    lastViolationDate: \"2024-02-28\",\n    violationType: \"Product Misrepresentation\",\n    orderFulfillmentRate: 85.3,\n    customerComplaintRate: 12.5,\n    returnRate: 18.7,\n    responseTime: 18.5,\n    accountAge: 24,\n    totalOrders: 8930\n  },\n  {\n    sellerId: \"SELL-003\",\n    sellerName: \"Home Essentials Plus\",\n    sellerEmail: \"user@example.com\",\n    complianceScore: 88,\n    violationCount: 2,\n    lastViolationDate: \"2024-02-10\",\n    violationType: \"Delayed Response\",\n    orderFulfillmentRate: 92.8,\n    customerComplaintRate: 5.4,\n    returnRate: 8.2,\n    responseTime: 8.7,\n    accountAge: 48,\n    totalOrders: 22150\n  },\n  {\n    sellerId: \"SELL-004\",\n    sellerName: \"Budget Bargains Inc\",\n    sellerEmail: \"user@example.com\",\n    complianceScore: 58,\n    violationCount: 12,\n    lastViolationDate: \"2024-03-05\",\n    violationType: \"Counterfeit Products\",\n    orderFulfillmentRate: 68.2,\n    customerComplaintRate: 28.3,\n    returnRate: 35.6,\n    responseTime: 36.2,\n    accountAge: 12,\n    totalOrders: 4520\n  },\n  {\n    sellerId: \"SELL-005\",\n    sellerName: \"Quality Goods Marketplace\",\n    sellerEmail: \"user@example.com\",\n    complianceScore: 91,\n    violationCount: 1,\n    lastViolationDate: \"2024-01-22\",\n    violationType: \"Packaging Issue\",\n    orderFulfillmentRate: 96.7,\n    customerComplaintRate: 3.2,\n    returnRate: 6.1,\n    responseTime: 5.8,\n    accountAge: 60,\n    totalOrders: 31840\n  }\n];\n\nreturn sellers.map(seller => ({ json: seller }));"
      },
      "typeVersion": 2
    },
    {
      "id": "90d46b07-5c88-4802-8e59-2e8d491f3971",
      "name": "Policy Monitoring Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        64,
        272
      ],
      "parameters": {
        "text": "=Seller Data: {{ JSON.stringify($json) }}",
        "options": {
          "systemMessage": "You are a Policy Monitoring Agent specialized in validating seller behavior and compliance metrics.\n\nYour task is to:\n1. Analyze seller compliance data including: compliance score, violation count, order fulfillment rate, customer complaint rate, return rate, response time, and account history\n2. Validate against platform policies for fairness and non-discriminatory enforcement\n3. Assess risk level based on multiple factors (not just single metrics)\n4. Identify patterns of concerning behavior vs isolated incidents\n5. Calculate an overall compliance status: COMPLIANT, WARNING, REVIEW_REQUIRED, or SUSPENSION_RECOMMENDED\n6. Provide detailed reasoning for your assessment\n7. Flag any potential bias or discriminatory patterns in the data\n8. Recommend appropriate enforcement action with justification\n\nEnsure your analysis is:\n- Fair and unbiased\n- Based on objective metrics\n- Considers context (account age, improvement trends, severity of violations)\n- Auditable with clear reasoning\n- Proportionate to the severity of issues\n\nReturn structured output with compliance status, risk score (0-100), reasoning, and recommended action."
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 3.1
    },
    {
      "id": "bc7f356c-c46a-4958-aa12-b647f398e684",
      "name": "OpenAI Model - Policy Monitor",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        64,
        496
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "id",
          "value": "gpt-4o"
        },
        "options": {
          "temperature": 0.2
        },
        "builtInTools": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "2230c8ae-6275-417a-807f-0fb2e9af69d8",
      "name": "Policy Validation Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        192,
        496
      ],
      "parameters": {
        "schemaType": "manual",
        "inputSchema": "{\n  \"type\": \"object\",\n  \"properties\": {\n    \"complianceStatus\": {\n      \"type\": \"string\",\n      \"enum\": [\"COMPLIANT\", \"WARNING\", \"REVIEW_REQUIRED\", \"SUSPENSION_RECOMMENDED\"],\n      \"description\": \"The compliance status of the seller\"\n    },\n    \"riskScore\": {\n      \"type\": \"number\",\n      \"minimum\": 0,\n      \"maximum\": 100,\n      \"description\": \"Risk score from 0 to 100\"\n    },\n    \"reasoning\": {\n      \"type\": \"string\",\n      \"description\": \"Explanation for the compliance assessment\"\n    },\n    \"recommendedAction\": {\n      \"type\": \"string\",\n      \"description\": \"Recommended action to take\"\n    },\n    \"biasFlags\": {\n      \"type\": \"array\",\n      \"items\": {\n        \"type\": \"string\"\n      },\n      \"description\": \"Array of potential bias flags identified\"\n    },\n    \"contextualFactors\": {\n      \"type\": \"object\",\n      \"description\": \"Additional contextual factors considered in the assessment\"\n    }\n  },\n  \"required\": [\"complianceStatus\", \"riskScore\", \"reasoning\", \"recommendedAction\", \"biasFlags\", \"contextualFactors\"]\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "931c987a-c96d-47b4-8f76-f324f4920c34",
      "name": "Route by Compliance Status",
      "type": "n8n-nodes-base.switch",
      "position": [
        432,
        552
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "outputKey": "Warning",
              "conditions": {
                "options": {
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.complianceStatus }}",
                    "rightValue": "WARNING"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "Review",
              "conditions": {
                "options": {
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.complianceStatus }}",
                    "rightValue": "REVIEW_REQUIRED"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "Suspension",
              "conditions": {
                "options": {
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.complianceStatus }}",
                    "rightValue": "SUSPENSION_RECOMMENDED"
                  }
                ]
              },
              "renameOutput": true
            }
          ]
        },
        "options": {
          "fallbackOutput": "extra",
          "renameFallbackOutput": "Compliant"
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "fec35253-b687-4f27-9d14-9527c669ca32",
      "name": "Governance Agent - Warning",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        704,
        192
      ],
      "parameters": {
        "text": "=Seller: {{ $json.sellerName }} (ID: {{ $json.sellerId }})\nCompliance Status: {{ $json.output.complianceStatus }}\nRisk Score: {{ $json.output.riskScore }}\nReasoning: {{ $json.output.reasoning }}",
        "options": {
          "systemMessage": "You are a Governance Agent responsible for orchestrating warning workflows with fairness and transparency.\n\nYour task is to:\n1. Review the compliance assessment and seller data\n2. Generate a fair and constructive warning message for the seller\n3. Specify corrective actions required with clear deadlines\n4. Document the warning in an auditable format\n5. Determine follow-up timeline (e.g., 7 days, 14 days)\n6. Ensure the warning is:\n   - Clear and specific about violations\n   - Non-discriminatory in language and tone\n   - Provides actionable steps for improvement\n   - Includes appeal process information\n   - Documents all context for audit trail\n\nReturn structured output with: warningMessage, correctiveActions (array), deadline, followUpDate, appealInstructions, and auditNotes."
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 3.1
    },
    {
      "id": "7b7ecc68-afb8-4f5a-a225-99373ec1d855",
      "name": "Governance Agent - Review",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        704,
        1088
      ],
      "parameters": {
        "text": "=Seller: {{ $json.sellerName }} (ID: {{ $json.sellerId }})\nCompliance Status: {{ $json.output.complianceStatus }}\nRisk Score: {{ $json.output.riskScore }}\nReasoning: {{ $json.output.reasoning }}",
        "options": {
          "systemMessage": "You are a Governance Agent responsible for orchestrating review workflows with fairness and due process.\n\nYour task is to:\n1. Review the compliance assessment and seller data\n2. Initiate a formal review process with clear scope and timeline\n3. Identify specific areas requiring investigation\n4. Assign review priority (High, Medium, Low)\n5. Generate review notification for the seller with:\n   - Clear explanation of review reasons\n   - Expected timeline and process\n   - Seller rights during review\n   - Required documentation from seller\n   - Appeal process information\n6. Create internal review checklist for compliance team\n7. Ensure fairness and non-discriminatory language\n\nReturn structured output with: reviewNotification, investigationScope (array), reviewPriority, timeline, requiredDocuments (array), sellerRights (array), reviewChecklist (array), and auditNotes."
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 3.1
    },
    {
      "id": "811df647-f817-488d-b796-6a8fa11f6177",
      "name": "Governance Agent - Suspension",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        704,
        592
      ],
      "parameters": {
        "text": "=Seller: {{ $json.sellerName }} (ID: {{ $json.sellerId }})\nCompliance Status: {{ $json.output.complianceStatus }}\nRisk Score: {{ $json.output.riskScore }}\nReasoning: {{ $json.output.reasoning }}",
        "options": {
          "systemMessage": "You are a Governance Agent responsible for orchestrating suspension workflows with strict fairness, due process, and appeal rights.\n\nYour task is to:\n1. Review the compliance assessment and seller data thoroughly\n2. Generate a formal suspension notice that includes:\n   - Specific violations leading to suspension\n   - Effective date and duration of suspension\n   - Conditions for reinstatement\n   - Detailed appeal process and timeline\n   - Contact information for appeals\n   - Seller rights during suspension\n3. Document complete justification for audit trail\n4. Ensure suspension is:\n   - Proportionate to violations\n   - Non-discriminatory\n   - Based on objective criteria\n   - Reversible through appeal process\n5. Create reinstatement criteria checklist\n6. Specify appeal deadline (typically 14-30 days)\n\nReturn structured output with: suspensionNotice, effectiveDate, duration, violations (array), reinstatementCriteria (array), appealProcess, appealDeadline, sellerRights (array), and auditJustification."
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 3.1
    },
    {
      "id": "135268bc-6b06-4c84-9e5e-c3153a69d7de",
      "name": "OpenAI Model - Governance",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        720,
        416
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "id",
          "value": "gpt-4o"
        },
        "options": {
          "temperature": 0.3
        },
        "builtInTools": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "22cd5b6a-5eb0-439f-947e-261b2961d650",
      "name": "Governance Output Parser - Warning",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        848,
        416
      ],
      "parameters": {
        "schemaType": "manual",
        "inputSchema": "{\n\t\"type\": \"object\",\n\t\"properties\": {\n\t\t\"warningMessage\": {\n\t\t\t\"type\": \"string\"\n\t\t},\n\t\t\"correctiveActions\": {\n\t\t\t\"type\": \"array\",\n\t\t\t\"items\": {\n\t\t\t\t\"type\": \"string\"\n\t\t\t}\n\t\t},\n\t\t\"deadline\": {\n\t\t\t\"type\": \"string\"\n\t\t},\n\t\t\"followUpDate\": {\n\t\t\t\"type\": \"string\"\n\t\t},\n\t\t\"appealInstructions\": {\n\t\t\t\"type\": \"string\"\n\t\t},\n\t\t\"auditNotes\": {\n\t\t\t\"type\": \"string\"\n\t\t}\n\t}\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "d6dd4ee5-589c-4cdc-b787-d99308fd6f3f",
      "name": "Governance Output Parser - Review",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        784,
        1312
      ],
      "parameters": {
        "schemaType": "manual",
        "inputSchema": "{\n\t\"type\": \"object\",\n\t\"properties\": {\n\t\t\"reviewNotification\": {\n\t\t\t\"type\": \"string\"\n\t\t},\n\t\t\"investigationScope\": {\n\t\t\t\"type\": \"array\",\n\t\t\t\"items\": {\n\t\t\t\t\"type\": \"string\"\n\t\t\t}\n\t\t},\n\t\t\"reviewPriority\": {\n\t\t\t\"type\": \"string\"\n\t\t},\n\t\t\"timeline\": {\n\t\t\t\"type\": \"string\"\n\t\t},\n\t\t\"requiredDocuments\": {\n\t\t\t\"type\": \"array\",\n\t\t\t\"items\": {\n\t\t\t\t\"type\": \"string\"\n\t\t\t}\n\t\t},\n\t\t\"sellerRights\": {\n\t\t\t\"type\": \"array\",\n\t\t\t\"items\": {\n\t\t\t\t\"type\": \"string\"\n\t\t\t}\n\t\t},\n\t\t\"reviewChecklist\": {\n\t\t\t\"type\": \"array\",\n\t\t\t\"items\": {\n\t\t\t\t\"type\": \"string\"\n\t\t\t}\n\t\t},\n\t\t\"auditNotes\": {\n\t\t\t\"type\": \"string\"\n\t\t}\n\t}\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "f5df7401-7f2d-46f5-9e26-fbf67a28912e",
      "name": "Governance Output Parser - Suspension",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        784,
        816
      ],
      "parameters": {
        "schemaType": "manual",
        "inputSchema": "{\n\t\"type\": \"object\",\n\t\"properties\": {\n\t\t\"suspensionNotice\": {\n\t\t\t\"type\": \"string\"\n\t\t},\n\t\t\"effectiveDate\": {\n\t\t\t\"type\": \"string\"\n\t\t},\n\t\t\"duration\": {\n\t\t\t\"type\": \"string\"\n\t\t},\n\t\t\"violations\": {\n\t\t\t\"type\": \"array\",\n\t\t\t\"items\": {\n\t\t\t\t\"type\": \"string\"\n\t\t\t}\n\t\t},\n\t\t\"reinstatementCriteria\": {\n\t\t\t\"type\": \"array\",\n\t\t\t\"items\": {\n\t\t\t\t\"type\": \"string\"\n\t\t\t}\n\t\t},\n\t\t\"appealProcess\": {\n\t\t\t\"type\": \"string\"\n\t\t},\n\t\t\"appealDeadline\": {\n\t\t\t\"type\": \"string\"\n\t\t},\n\t\t\"sellerRights\": {\n\t\t\t\"type\": \"array\",\n\t\t\t\"items\": {\n\t\t\t\t\"type\": \"string\"\n\t\t\t}\n\t\t},\n\t\t\"auditJustification\": {\n\t\t\t\"type\": \"string\"\n\t\t}\n\t}\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "c4f7cabe-feba-4391-a5a3-4040829f95db",
      "name": "Send Warning Email",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        1056,
        288
      ],
      "parameters": {
        "html": "=<h2>Seller Compliance Warning</h2><p>Dear {{ $json.sellerName }},</p><p>{{ $json.output.warningMessage }}</p><h3>Corrective Actions Required:</h3><ul>{{ $json.output.correctiveActions.map(action => `<li>${action}</li>`).join(\"\") }}</ul><p><strong>Deadline:</strong> {{ $json.output.deadline }}</p><p><strong>Follow-up Date:</strong> {{ $json.output.followUpDate }}</p><h3>Appeal Process:</h3><p>{{ $json.output.appealInstructions }}</p><p>Best regards,<br>Compliance Team</p>",
        "options": {},
        "subject": "Compliance Warning - Action Required",
        "toEmail": "={{ $json.sellerEmail }}",
        "fromEmail": "={{ $('Workflow Configuration').first().json.fromEmail }}"
      },
      "typeVersion": 2.1
    },
    {
      "id": "2a0c1f25-c7d6-48eb-ad8e-467b29604762",
      "name": "Send Review Email",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        1056,
        1088
      ],
      "parameters": {
        "html": "=<h2>Compliance Review Notice</h2><p>Dear {{ $json.sellerName }},</p><p>{{ $json.output.reviewNotification }}</p><h3>Investigation Scope:</h3><ul>{{ $json.output.investigationScope.map(item => `<li>${item}</li>`).join(\"\") }}</ul><p><strong>Priority:</strong> {{ $json.output.reviewPriority }}</p><p><strong>Timeline:</strong> {{ $json.output.timeline }}</p><h3>Required Documentation:</h3><ul>{{ $json.output.requiredDocuments.map(doc => `<li>${doc}</li>`).join(\"\") }}</ul><h3>Your Rights:</h3><ul>{{ $json.output.sellerRights.map(right => `<li>${right}</li>`).join(\"\") }}</ul><p>Best regards,<br>Compliance Team</p>",
        "options": {},
        "subject": "Compliance Review Initiated - Your Account",
        "toEmail": "={{ $json.sellerEmail }}",
        "fromEmail": "={{ $('Workflow Configuration').first().json.fromEmail }}"
      },
      "typeVersion": 2.1
    },
    {
      "id": "112ea84e-a6af-44b1-a372-1b316a3cd8a1",
      "name": "Send Suspension Email",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        1056,
        688
      ],
      "parameters": {
        "html": "=<h2>Account Suspension Notice</h2><p>Dear {{ $json.sellerName }},</p><p>{{ $json.output.suspensionNotice }}</p><p><strong>Effective Date:</strong> {{ $json.output.effectiveDate }}</p><p><strong>Duration:</strong> {{ $json.output.duration }}</p><h3>Violations:</h3><ul>{{ $json.output.violations.map(v => `<li>${v}</li>`).join(\"\") }}</ul><h3>Reinstatement Criteria:</h3><ul>{{ $json.output.reinstatementCriteria.map(c => `<li>${c}</li>`).join(\"\") }}</ul><h3>Appeal Process:</h3><p>{{ $json.output.appealProcess }}</p><p><strong>Appeal Deadline:</strong> {{ $json.output.appealDeadline }}</p><h3>Your Rights:</h3><ul>{{ $json.output.sellerRights.map(right => `<li>${right}</li>`).join(\"\") }}</ul><p>Best regards,<br>Compliance Team</p>",
        "options": {},
        "subject": "Account Suspension Notice - Appeal Rights Included",
        "toEmail": "={{ $json.sellerEmail }}",
        "fromEmail": "={{ $('Workflow Configuration').first().json.fromEmail }}"
      },
      "typeVersion": 2.1
    },
    {
      "id": "e3b51f0c-979c-4e00-8e55-51f41466f516",
      "name": "Notify Compliance Team - Warning",
      "type": "n8n-nodes-base.slack",
      "position": [
        1280,
        288
      ],
      "parameters": {
        "text": "=\u26a0\ufe0f *Compliance Warning Issued*\n\n*Seller:* {{ $json.sellerName }} (ID: {{ $json.sellerId }})\n*Risk Score:* {{ $json.output.riskScore }}/100\n*Deadline:* {{ $json.output.deadline }}\n\n*Corrective Actions:*\n{{ $json.output.correctiveActions.map((action, i) => `${i+1}. ${action}`).join(\"\\n\") }}\n\n*Audit Notes:* {{ $json.output.auditNotes }}",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Workflow Configuration').first().json.complianceTeamSlackChannel }}"
        },
        "otherOptions": {},
        "authentication": "oAuth2"
      },
      "credentials": {
        "slackOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.4
    },
    {
      "id": "ffcfebd4-f8ab-4b93-b3f9-7d7b840e7d88",
      "name": "Notify Compliance Team - Review",
      "type": "n8n-nodes-base.slack",
      "position": [
        1280,
        1088
      ],
      "parameters": {
        "text": "=\ud83d\udd0d *Compliance Review Initiated*\n\n*Seller:* {{ $json.sellerName }} (ID: {{ $json.sellerId }})\n*Risk Score:* {{ $json.output.riskScore }}/100\n*Priority:* {{ $json.output.reviewPriority }}\n*Timeline:* {{ $json.output.timeline }}\n\n*Investigation Scope:*\n{{ $json.output.investigationScope.map((item, i) => `${i+1}. ${item}`).join(\"\\n\") }}\n\n*Review Checklist:*\n{{ $json.output.reviewChecklist.map((item, i) => `${i+1}. ${item}`).join(\"\\n\") }}\n\n*Audit Notes:* {{ $json.output.auditNotes }}",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Workflow Configuration').first().json.complianceTeamSlackChannel }}"
        },
        "otherOptions": {},
        "authentication": "oAuth2"
      },
      "credentials": {
        "slackOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.4
    },
    {
      "id": "1e6ac10f-06d7-4a99-bf39-2fc2f15c1fea",
      "name": "Notify Compliance Team - Suspension",
      "type": "n8n-nodes-base.slack",
      "position": [
        1280,
        688
      ],
      "parameters": {
        "text": "=\ud83d\udeab *Account Suspension Executed*\n\n*Seller:* {{ $json.sellerName }} (ID: {{ $json.sellerId }})\n*Risk Score:* {{ $json.output.riskScore }}/100\n*Effective Date:* {{ $json.output.effectiveDate }}\n*Duration:* {{ $json.output.duration }}\n*Appeal Deadline:* {{ $json.output.appealDeadline }}\n\n*Violations:*\n{{ $json.output.violations.map((v, i) => `${i+1}. ${v}`).join(\"\\n\") }}\n\n*Reinstatement Criteria:*\n{{ $json.output.reinstatementCriteria.map((c, i) => `${i+1}. ${c}`).join(\"\\n\") }}\n\n*Audit Justification:* {{ $json.output.auditJustification }}",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Workflow Configuration').first().json.complianceTeamSlackChannel }}"
        },
        "otherOptions": {},
        "authentication": "oAuth2"
      },
      "credentials": {
        "slackOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.4
    },
    {
      "id": "99f9be63-5462-40d6-813d-ddd835b6f1a7",
      "name": "Merge Enforcement Actions",
      "type": "n8n-nodes-base.merge",
      "position": [
        1504,
        672
      ],
      "parameters": {
        "numberInputs": 3
      },
      "typeVersion": 3.2
    },
    {
      "id": "59fc8d1d-19e4-41cc-a5f2-d95149ca683b",
      "name": "Log Audit Trail",
      "type": "n8n-nodes-base.set",
      "position": [
        1728,
        688
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "id-1",
              "name": "auditTimestamp",
              "type": "string",
              "value": "={{ $now.toISO() }}"
            },
            {
              "id": "id-2",
              "name": "sellerId",
              "type": "string",
              "value": "={{ $json.sellerId }}"
            },
            {
              "id": "id-3",
              "name": "sellerName",
              "type": "string",
              "value": "={{ $json.sellerName }}"
            },
            {
              "id": "id-4",
              "name": "enforcementAction",
              "type": "string",
              "value": "={{ $json.output.complianceStatus }}"
            },
            {
              "id": "id-5",
              "name": "riskScore",
              "type": "number",
              "value": "={{ $json.output.riskScore }}"
            },
            {
              "id": "id-6",
              "name": "reasoning",
              "type": "string",
              "value": "={{ $json.output.reasoning }}"
            },
            {
              "id": "id-7",
              "name": "governanceOutput",
              "type": "string",
              "value": "={{ JSON.stringify($json.output) }}"
            },
            {
              "id": "id-8",
              "name": "emailSent",
              "type": "boolean",
              "value": true
            },
            {
              "id": "id-9",
              "name": "slackNotificationSent",
              "type": "boolean",
              "value": true
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "fc1db9bd-2c0f-437e-a95d-cc8c8c66d77e",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -576,
        -272
      ],
      "parameters": {
        "width": 752,
        "height": 304,
        "content": "## How It Works\nThis workflow automates regulatory compliance monitoring and policy violation detection for enterprises managing complex governance requirements. Designed for compliance officers, legal teams, and risk management departments, it addresses the challenge of continuous policy adherence across organizational activities while reducing manual audit overhead.The system initiates on schedule, triggering compliance checks across operational data. Solar compliance data generation simulates policy document collection from various business units. Claude AI performs comprehensive policy validation against regulatory frameworks, while parallel NVIDIA governance models analyze specific compliance dimensions through structured outputs. The workflow routes findings by compliance status: violations trigger immediate escalation emails to compliance teams with detailed Slack notifications, warnings generate supervisor alerts with tracking mechanisms, and compliant activities proceed to standard documentation. All execution paths merge for consolidated audit trail creation, logging enforcement actions and generating governance reports for regulatory submissions.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "a5f91a3b-11fa-4e78-8c28-ef427f8be2cb",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        240,
        -224
      ],
      "parameters": {
        "width": 480,
        "height": 256,
        "content": "## Setup Steps\n1. Configure Schedule Compliance Check node with monitoring frequency  \n2. Add Claude AI credentials in Workflow Configuration and Policy Validation nodes  \n3. Set up NVIDIA API keys for governance output parser and agent modules in respective nodes\n4. Connect Gmail authentication for compliance team alerts and configure recipient distribution lists\n5. Integrate Slack workspace credentials and specify compliance channel webhooks "
      },
      "typeVersion": 1
    },
    {
      "id": "f9b9639b-0625-445d-855a-d5e3c80be0ae",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        832,
        -336
      ],
      "parameters": {
        "color": 5,
        "width": 528,
        "height": 368,
        "content": "## Prerequisites\nClaude API access, NVIDIA API credentials, Gmail/Google Workspace account\n## Use Cases\nFinancial services regulatory compliance (SOX, GDPR), healthcare HIPAA monitoring\n## Customization\nAdd industry-specific regulatory frameworks, integrate document management systems\n## Benefits\nReduces compliance audit time by 70%, ensures consistent policy application across departments"
      },
      "typeVersion": 1
    },
    {
      "id": "a4f89ff9-352a-4201-9f2f-c20233660b03",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -656,
        80
      ],
      "parameters": {
        "color": 7,
        "width": 1024,
        "height": 944,
        "content": "## Automated Policy Compliance Monitoring\n**Why**\nAutomates continuous monitoring instead of periodic manual audits, enabling real-time detection of policy deviations before they escalate into violations."
      },
      "typeVersion": 1
    },
    {
      "id": "47d89356-a72a-4b7b-9232-b85c0bb7ba9a",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        384,
        64
      ],
      "parameters": {
        "color": 7,
        "width": 640,
        "height": 1392,
        "content": "## Risk-Based Violation Routing\n**Why**\nPrioritizes critical violations for immediate action while managing lower-risk issues efficiently, preventing alert fatigue and optimizing compliance team resources.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "2f3c68f9-805d-4db2-a839-17756546e6a5",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1040,
        64
      ],
      "parameters": {
        "color": 7,
        "width": 864,
        "height": 1264,
        "content": "\n## Governance Documentation & Audit Reporting\n**Why**\nEnsures accountability through documented enforcement actions, maintains evidence trails for auditors, and enables data-driven policy improvement initiatives."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "availableInMCP": false,
    "executionOrder": "v1"
  },
  "versionId": "5935e525-15fd-40fc-bcce-0bc4f7e49169",
  "connections": {
    "Send Review Email": {
      "main": [
        [
          {
            "node": "Notify Compliance Team - Review",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Warning Email": {
      "main": [
        [
          {
            "node": "Notify Compliance Team - Warning",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Suspension Email": {
      "main": [
        [
          {
            "node": "Notify Compliance Team - Suspension",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Workflow Configuration": {
      "main": [
        [
          {
            "node": "Generate Seller Compliance Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Policy Monitoring Agent": {
      "main": [
        [
          {
            "node": "Route by Compliance Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Governance Agent - Review": {
      "main": [
        [
          {
            "node": "Send Review Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Enforcement Actions": {
      "main": [
        [
          {
            "node": "Log Audit Trail",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Model - Governance": {
      "ai_languageModel": [
        [
          {
            "node": "Governance Agent - Warning",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Governance Agent - Review",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Governance Agent - Suspension",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Compliance Check": {
      "main": [
        [
          {
            "node": "Workflow Configuration",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Governance Agent - Warning": {
      "main": [
        [
          {
            "node": "Send Warning Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route by Compliance Status": {
      "main": [
        [
          {
            "node": "Governance Agent - Warning",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Governance Agent - Review",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Governance Agent - Suspension",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Governance Agent - Suspension": {
      "main": [
        [
          {
            "node": "Send Suspension Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Model - Policy Monitor": {
      "ai_languageModel": [
        [
          {
            "node": "Policy Monitoring Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Generate Seller Compliance Data": {
      "main": [
        [
          {
            "node": "Policy Monitoring Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Notify Compliance Team - Review": {
      "main": [
        [
          {
            "node": "Merge Enforcement Actions",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Policy Validation Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Policy Monitoring Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Notify Compliance Team - Warning": {
      "main": [
        [
          {
            "node": "Merge Enforcement Actions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Governance Output Parser - Review": {
      "ai_outputParser": [
        [
          {
            "node": "Governance Agent - Review",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Governance Output Parser - Warning": {
      "ai_outputParser": [
        [
          {
            "node": "Governance Agent - Warning",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Notify Compliance Team - Suspension": {
      "main": [
        [
          {
            "node": "Merge Enforcement Actions",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "Governance Output Parser - Suspension": {
      "ai_outputParser": [
        [
          {
            "node": "Governance Agent - Suspension",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

This workflow automates regulatory compliance monitoring and policy violation detection for enterprises managing complex governance requirements. Designed for compliance officers, legal teams, and risk management departments, it addresses the challenge of continuous policy…

Source: https://n8n.io/workflows/13311/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

This workflow automates end-to-end carbon emissions monitoring, strategy optimisation, and ESG reporting using a multi-agent AI supervisor architecture in n8n. Designed for sustainability managers, ES

Agent, OpenAI Chat, Output Parser Structured +10
AI & RAG

This workflow automates end-to-end carbon emissions monitoring, strategy optimisation, and ESG reporting using a multi-agent AI supervisor architecture in n8n. Designed for sustainability managers, ES

Agent, OpenAI Chat, Output Parser Structured +10
AI & RAG

This workflow automates end-to-end carbon emissions monitoring, strategy optimisation, and ESG reporting using a multi-agent AI supervisor architecture in n8n. Designed for sustainability managers, ES

Agent, OpenAI Chat, Output Parser Structured +10
AI & RAG

This workflow automates semiconductor board-level reliability monitoring using AI agents. It targets reliability engineers, manufacturing teams, and quality analysts. The system collects capacity, his

Google Sheets, Agent, OpenAI Chat +10
AI & RAG

This workflow automates procurement fraud detection and supplier compliance monitoring for organizations managing complex purchasing operations. Designed for procurement teams, audit departments, and

OpenAI Chat, Output Parser Structured, Agent +6