Redact and restore PII in OpenAI prompts with Enterprise PII Guardrails
UnknownWhat this workflow does
This AI workflow has 5 nodes and runs manually, when you click “Execute workflow”. Along the way it connects OpenAI and Piiguardrails (community).
How it runs
Trigger: Manually, when you click “Execute workflow”.
- Set Customer Prompt with PII (Edit Fields (Set)): sets 1 field: customer_prompt
- Mask PII with Enterprise Guardrails (Pii Guardrails): uses Pii Guardrails
- OpenAI: uses OpenAI
- Restore Original PII from Tokens (Pii Guardrails): unmask
Services it uses
Before you upgrade to n8n 3.0
We can't fully verify this one: it relies on 1 community package, and n8n 3.0 turns unverified community packages off by default (N8N_UNVERIFIED_PACKAGES_ENABLED=false).
- Check that n8n-nodes-piiguardrails is verified or supports 3.0 (used in Mask PII with Enterprise Guardrails, Restore Original PII from Tokens).
Nodes used (4)
- Manual Trigger
n8n-nodes-base.manualTrigger - Edit Fields (Set)
n8n-nodes-base.set - Pii Guardrails
n8n-nodes-piiguardrails.piiGuardrails - OpenAI
@n8n/n8n-nodes-langchain.openAi
From the author
Quick overview This workflow masks sensitive PII in a customer prompt using Enterprise PII Guardrails, sends the sanitized text through a simulated LLM step, and then restores the original values in the LLM response using the reversible token mapping. How it…