{
  "name": "AI privacy-minded router: PII detection for privacy, security, & compliance",
  "nodes": [
    {
      "id": "enhanced-pii-analyzer",
      "name": "Enhanced PII Pattern Analyzer",
      "type": "n8n-nodes-base.code",
      "position": [
        -20,
        300
      ]
    },
    {
      "id": "enhanced-routing-switch",
      "name": "Enhanced PII Routing Switch",
      "type": "n8n-nodes-base.switch",
      "position": [
        480,
        300
      ]
    },
    {
      "id": "compliance-logger",
      "name": "Compliance & Audit Logger",
      "type": "n8n-nodes-base.code",
      "position": [
        720,
        0
      ]
    },
    {
      "id": "error-handler",
      "name": "Error Handler & Recovery",
      "type": "n8n-nodes-base.code",
      "position": [
        1240,
        20
      ]
    },
    {
      "id": "monitoring-dashboard",
      "name": "Real-time Monitoring Dashboard",
      "type": "n8n-nodes-base.code",
      "position": [
        1840,
        160
      ]
    },
    {
      "id": "5824055a-a3ba-4f20-a45c-1849cb164a38",
      "name": "When chat message received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        -700,
        60
      ]
    },
    {
      "id": "ad6004ea-e216-496f-a292-dbcff70bf3e3",
      "name": "Ollama Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOllama",
      "position": [
        2360,
        520
      ]
    },
    {
      "id": "ab205aa5-76d3-4d39-81de-e379ac1e825c",
      "name": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        1220,
        700
      ]
    },
    {
      "id": "dbc77760-ba26-430b-b93a-ba1c262a4841",
      "name": "Agent [Edge]",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1120,
        500
      ]
    },
    {
      "id": "debcae47-c352-4c58-9abc-c1e2dd46c3ea",
      "name": "AI Agent [Private]",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        2360,
        320
      ]
    },
    {
      "id": "bbfe5682-a06a-4744-a6f7-df298ea8595c",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1360,
        240
      ],
      "parameters": {
        "width": 980,
        "height": 1480,
        "content": "## Privacy-Minded Router: Enhanced PII Detection Workflow Concept [START HERE]\n\nBy: Charles Oh, https://www.linkedin.com/in/codetender/\n\n* This living Concept is for DEMONSTRATION purposes only and is"
      }
    },
    {
      "id": "3482b42a-0547-4fd5-bc5f-932891d01a50",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -260,
        480
      ],
      "parameters": {
        "width": 540,
        "height": 1240,
        "content": "## Enhanced PII Pattern Analyzer 🧠\n\n**What it does:**\nThe \"brain\" of the system - analyzes every message for sensitive information\n\n**Technology**: \nJavaScript with crypto libraries\n\n**Core Intelligen"
      }
    },
    {
      "id": "a540749b-c283-4f98-9ce4-7d44c4b8ddf8",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        300,
        480
      ],
      "parameters": {
        "width": 500,
        "height": 740,
        "content": "## Enhanced PII Routing Switch 📊\n\n**What it does: **\nMakes intelligent routing decisions based on analysis results\n\n**Technology: **\nn8n Switch Node with advanced rule logic\n\n**3-Tier Decision Logic:*"
      }
    },
    {
      "id": "d90f9215-3ac9-42e8-a05c-e3905267461f",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        520,
        -1120
      ],
      "parameters": {
        "width": 1640,
        "height": 240,
        "content": "## Processing Pipeline:\n\nPII Data → Compliance Logger → Error Handler → Monitoring → AI Agent [Private]\n\n**Why This Architecture:**\n\nComplete Audit Trail: Every sensitive message gets full monitoring\n"
      }
    },
    {
      "id": "a9769940-0153-414a-a72b-7a3df0a4905d",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        920,
        860
      ],
      "parameters": {
        "width": 580,
        "height": 520,
        "content": "## Key Capabilities:\n\nOpenRouter account configured for cloud models\n\nEnhanced Memory: 50-message context window for better conversations. Easily swapped to any database/Memory integration.\n\nDirect Pr"
      }
    },
    {
      "id": "3664412c-918f-496d-8e6a-5399a9c55753",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        520,
        -860
      ],
      "parameters": {
        "width": 500,
        "height": 1020,
        "content": "## Compliance & Audit Logger 📋\n\nWhat it does: Creates comprehensive, PII-safe audit trails\nTechnology: Advanced JavaScript with cryptographic session tracking\nAudit Trail Components:\nA) Session Tracki"
      }
    },
    {
      "id": "e670b576-d808-453d-a33f-d5b2ded2691d",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1040,
        -860
      ],
      "parameters": {
        "width": 540,
        "height": 1020,
        "content": "## Error Handler & Recovery 🛠️\n \nWhat it does: Ensures system resilience and compliance even during failures\nTechnology: Comprehensive error detection with automatic recovery\nError Detection Categorie"
      }
    },
    {
      "id": "caf87df6-41ea-4680-b474-c060abe96ee9",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1600,
        -860
      ],
      "parameters": {
        "width": 560,
        "height": 1180,
        "content": "## Real-time Monitoring Dashboard 📊\n \nWhat it does: Provides comprehensive system observability and alerting\nTechnology: Advanced metrics collection with intelligent alerting\nMonitoring Categories:\nA)"
      }
    },
    {
      "id": "8b4453f7-4a4a-421a-9449-e4840c409186",
      "name": "OpenRouter Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        1080,
        700
      ]
    },
    {
      "id": "1241c848-1667-4e74-9341-ecf06a96a4a5",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2340,
        140
      ],
      "parameters": {
        "width": 400,
        "height": null,
        "content": "## A cleaned LLM Request\n\nIf PII was detected, the original request should now be here. In the previous steps, any detected PII should be masked. That masked version of the message is what we use in t"
      }
    }
  ],
  "connections": {
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "Agent [Edge]",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Ollama Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent [Private]",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenRouter Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Agent [Edge]",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Error Handler & Recovery": {
      "main": [
        [
          {
            "node": "Real-time Monitoring Dashboard",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Compliance & Audit Logger": {
      "main": [
        [
          {
            "node": "Error Handler & Recovery",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "Enhanced PII Pattern Analyzer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Enhanced PII Routing Switch": {
      "main": [
        [
          {
            "node": "Compliance & Audit Logger",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Compliance & Audit Logger",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Agent [Edge]",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Enhanced PII Pattern Analyzer": {
      "main": [
        [
          {
            "node": "Enhanced PII Routing Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Real-time Monitoring Dashboard": {
      "main": [
        [
          {
            "node": "AI Agent [Private]",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}