Gemini Moderation POST Webhook for n8n: PII Redaction
Gemini Moderation POST Webhook for n8n: PII Redaction
Regular price
£78.99
Regular price
£78.99
Sale price
Unit price
/
per
⬇
Instant Digital Download
∞
Unlimited Downloads
★
Lifetime Access in Your Account
Couldn't load pickup availability
🔥
128+ Sold
Popular with n8n builders
âš¡
23 people viewing
High interest right now
✅
9 added today
Fast-moving digital product
Gemini Moderation POST Webhook for n8n: PII Redaction
Regular price
£78.99
Regular price
£78.99
Sale price
Unit price
/
per
Moderate user text in real time with a Gemini POST webhook—PII redaction included
This n8n automation provides a POST webhook that sends text to Google Gemini for safety moderation. You get a structured decision (allow/flag/block), toxicity level, matched categories, detected PII types, a short reason, and a cleaned version where slurs are masked and PII is redacted.
What this workflow does
-
Receives a request: Handles a POST call on a webhook endpoint with JSON containing
textand optionalcontext. -
Calls Google Gemini: Sends the input to Gemini with instructions to classify safety, rate toxicity, identify categories, detect PII, and generate a redacted/masked
cleaned_text. - Parses the result: Converts Gemini’s response into a structured JSON object containing the moderation fields.
- Returns moderation output: Responds to the caller with the moderation decision and redaction results.
- Fail-safe handling: If Gemini can’t classify the content, the workflow returns a fail-safe JSON response that flags the content for human review.
Use cases
- SaaS moderation for user-submitted comments, feedback, or messages.
- PII protection when logs, tickets, or chats may contain personal data that must be redacted before storage.
- Human-in-the-loop review when confidence is low or classification fails.
- Content safety enforcement with actionable outcomes (allow/flag/block) and category tagging.
Technical details (n8n workflow)
-
Webhook trigger with a
/moderateendpoint (POST JSON:{ "text": "...", "context": "..." }). - Google Gemini (PaLM) API via an n8n Google Gemini Chat Model credential.
- Workflow logic using nodes such as if, code, aggregate, slack, and a sticky note.
Set up your Gemini credential, activate the workflow, then use the production webhook URL in your app to moderate content with PII redaction and safety decisions.
