AI privacy-minded router: PII detection for privacy, security, & compliance
Ready for 3.0Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.
What this workflow does
This AI workflow has 11 nodes and runs when a chat message arrives. Along the way it connects Ollama Chat Model and OpenRouter Chat Model.
How it runs
Trigger: When a chat message arrives.
- Enhanced PII Pattern Analyzer (Code): runs custom JavaScript code
- Enhanced PII Routing Switch (Switch): routes items into 3 branches
- Compliance & Audit Logger (Code): runs custom JavaScript code
- Agent [Edge] (AI Agent): runs an AI agent, with model: OpenRouter Chat Model; memory: Simple Memory
- Error Handler & Recovery (Code): runs custom JavaScript code
- Real-time Monitoring Dashboard (Code): runs custom JavaScript code
- AI Agent: runs an AI agent, with model: Ollama Chat Model
Services it uses
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (7)
- Code
n8n-nodes-base.code - Switch
n8n-nodes-base.switch - Chat Trigger
@n8n/n8n-nodes-langchain.chatTrigger - Ollama Chat Model
@n8n/n8n-nodes-langchain.lmChatOllama - Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow - AI Agent
@n8n/n8n-nodes-langchain.agent - OpenRouter Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenRouter
From the author
Modern AI systems are powerful but pose privacy risks when handling sensitive data. Organizations need AI capabilities while ensuring: ✅ Sensitive data never leaves secure environments ✅ Compliance with regulations (GDPR, HIPAA, PCI, SOX) ✅ Real-time decision…