Secure AI Analysis: Mask PII in Google Sheets with n8n Workflows
Secure AI Analysis: Mask PII in Google Sheets with n8n Workflows
Couldn't load pickup availability
Secure AI Analysis: Mask PII in Google Sheets with n8n Workflows
Protect sensitive personal information while leveraging AI analysis with this comprehensive n8n workflow that automatically detects, masks, and securely handles PII data in your text processing pipeline. Perfect for compliance teams, HR operations, support teams, and legal departments who need AI insights without compromising data privacy.
What this workflow does
This intelligent automation receives text through a webhook endpoint and systematically identifies personally identifiable information using advanced regex patterns and context-based matching. The workflow detects emails, phone numbers, addresses, IDs, names, and other sensitive values, then replaces them with reversible tokens before sending sanitized content to GPT-5.5 for analysis. All token metadata and audit information are securely stored in Google Sheets with dedicated PII Vault and Audit Log tabs. After AI processing, original values are restored from the in-execution vault, results are logged, and a complete JSON response is returned.
Use cases
- Support ticket analysis: Analyze customer support requests while protecting personal details
- HR document processing: Extract insights from employee forms and applications safely
- Legal document review: Process contracts and legal submissions with PII protection
- Compliance auditing: Maintain detailed audit trails for data processing activities
- Form submission analysis: Analyze user-submitted content while maintaining privacy standards
Technical details
Built using n8n's webhook, code, Google Sheets, OpenAI, and respond to webhook nodes. Requires OpenAI access to GPT-5.5, Google Sheets credentials, and webhook functionality. The workflow can be customized to add country-specific PII patterns, integrate encrypted database storage instead of Google Sheets, implement manual review routing for high-risk documents, or return masked outputs for users with limited privileges.
Ready to implement secure AI analysis in your organization? This workflow provides enterprise-grade PII protection while maintaining the power of advanced AI processing for your sensitive documents and data.
