workflows.fit
Back to n8n workflows
n8n templateFreeBy Țugui Dragoș

Mask PII before GPT-5.5 analysis with Google Sheets audit logs

This template is for compliance teams, support teams, HR operations, legal teams, and builders who want to use AI analysis while reducing exposure of personal data. It is useful when documents, tickets, or form submis...

Data & StorageProductivityDevelopmentCore NodesAILangchainUtilityWebhook
Loading interactive preview...

Template notes

This template is for compliance teams, support teams, HR operations, legal teams, and builders who want to use AI analysis while reducing exposure of personal data. It is useful when documents, tickets, or form submissions may contain emails, phone numbers, addresses, IDs, or other sensitive values.

How it works

The workflow receives text through a webhook, detects structured PII with regex patterns, and applies lightweight context-based matching for names and addresses. Detected values are replaced with reversible tokens before the sanitized text is sent to GPT-5.5 for analysis. The workflow stores token metadata and audit information in Google Sheets, restores original values from the in-execution vault after analysis, logs the processing result, and returns a JSON response.

How to set up

Create a Google Sheet with PII Vault and Audit Log tabs. Connect Google Sheets and OpenAI credentials, then send a POST request to the /pii-proxy webhook with a text field.

Requirements

OpenAI access to GPT-5.5, Google Sheets credentials, and webhook access in n8n.

How to customize the workflow