Templates / Moderate toxic text, redact PII, and audit with a Gemini HTTP API

Moderate toxic text, redact PII, and audit with a Gemini HTTP API

Ready for 3.0

by Oka Hironobu ✓ · 24 views · created 2026-07-27 · Document Extraction, AI Summarization

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What this workflow does

This AI workflow has 12 nodes and runs when an HTTP POST request hits its webhook URL. Along the way it connects Google Gemini Chat Model, Google Sheets and Slack.

How it runs

Trigger: When an HTTP POST request hits its webhook URL.

  1. Normalize Request (Code): runs custom JavaScript code
  2. Moderate Text with Gemini (Basic LLM Chain): sends a prompt to an LLM, with model: Google Gemini Chat Model; output parser: Moderation Parser
  3. Shape Result (Code): runs custom JavaScript code
  4. Log to Audit Trail (Google Sheets): append
  5. Bundle Results (Aggregate): combines items into one
  6. Build API Response (Code): runs custom JavaScript code
  7. Return Result (Respond to Webhook): sends the response back to the webhook caller
  8. Any Blocked (If): checks a condition and branches into true / false
  9. Alert on Blocked Content (Slack): uses Slack

Services it uses

Google Gemini Chat ModelGoogle SheetsSlack

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

Nodes used (10)

From the author

Quick Overview This workflow exposes a POST webhook that sends user text (and optional context) to Google Gemini for moderation, returning an allow/flag/block decision, toxicity level, matched categories, detected PII types, a short reason, and a cleaned…

Excerpt from Oka Hironobu's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.