{"product_id":"gemini-moderation-post-webhook-for-n8n-pii-redaction","title":"Gemini Moderation POST Webhook for n8n: PII Redaction","description":"\u003ch3\u003eModerate user text in real time with a Gemini POST webhook—PII redaction included\u003c\/h3\u003e\n\u003cp\u003eThis n8n automation provides a \u003cstrong\u003ePOST webhook\u003c\/strong\u003e that sends text to \u003cstrong\u003eGoogle Gemini\u003c\/strong\u003e for safety moderation. You get a structured decision (\u003cem\u003eallow\/flag\/block\u003c\/em\u003e), toxicity level, matched categories, detected \u003cstrong\u003ePII types\u003c\/strong\u003e, a short reason, and a \u003cstrong\u003ecleaned version\u003c\/strong\u003e where slurs are masked and PII is redacted.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eReceives a request:\u003c\/strong\u003e Handles a POST call on a webhook endpoint with JSON containing \u003ccode\u003etext\u003c\/code\u003e and optional \u003ccode\u003econtext\u003c\/code\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eCalls Google Gemini:\u003c\/strong\u003e Sends the input to Gemini with instructions to classify safety, rate toxicity, identify categories, detect PII, and generate a redacted\/masked \u003ccode\u003ecleaned_text\u003c\/code\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eParses the result:\u003c\/strong\u003e Converts Gemini’s response into a structured JSON object containing the moderation fields.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eReturns moderation output:\u003c\/strong\u003e Responds to the caller with the moderation decision and redaction results.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eFail-safe handling:\u003c\/strong\u003e If Gemini can’t classify the content, the workflow returns a fail-safe JSON response that flags the content for \u003cstrong\u003ehuman review\u003c\/strong\u003e.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSaaS moderation\u003c\/strong\u003e for user-submitted comments, feedback, or messages.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003ePII protection\u003c\/strong\u003e when logs, tickets, or chats may contain personal data that must be redacted before storage.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eHuman-in-the-loop review\u003c\/strong\u003e when confidence is low or classification fails.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eContent safety enforcement\u003c\/strong\u003e with actionable outcomes (allow\/flag\/block) and category tagging.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details (n8n workflow)\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eWebhook\u003c\/strong\u003e trigger with a \u003ccode\u003e\/moderate\u003c\/code\u003e endpoint (POST JSON: \u003ccode\u003e{ \"text\": \"...\", \"context\": \"...\" }\u003c\/code\u003e).\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eGoogle Gemini (PaLM) API\u003c\/strong\u003e via an n8n \u003cstrong\u003eGoogle Gemini Chat Model\u003c\/strong\u003e credential.\u003c\/li\u003e\n  \u003cli\u003eWorkflow logic using nodes such as \u003cstrong\u003eif\u003c\/strong\u003e, \u003cstrong\u003ecode\u003c\/strong\u003e, \u003cstrong\u003eaggregate\u003c\/strong\u003e, \u003cstrong\u003eslack\u003c\/strong\u003e, and a \u003cstrong\u003esticky note\u003c\/strong\u003e.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003cp\u003eSet 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.\u003c\/p\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":45738636050611,"sku":"N8N-17517","price":78.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/sIc5IY70E58vDy309r2DM_HFBi1pcM.png?v=1785230475","url":"https:\/\/buyflowscripts.com\/products\/gemini-moderation-post-webhook-for-n8n-pii-redaction","provider":"N8N Commerce","version":"1.0","type":"link"}