AI · 05 — Guardrail (PII redaction)

Deterministic safety — no model needed. The Guardrail scrubs emails, phone numbers and card numbers from text before it reaches an AI (or a log). The Console shows before vs after.

What’s inside

4 nodes — every type links to its full reference page.

StepNodeType
Risky text Inject input.inject
Keep original Edit Fields (Set) processing.set
Redact PII Guardrail processing.guardrail
Before / after Console utility.console

Import it

  1. Studio → Import — paste the JSON below (or the URL /docs/templates/ai-05-guardrail-pii-redaction.json).
  2. Or ask the AI Copilot with the JSON pasted after the phrase:
    import this workflow json into a new workflow named "AI · 05 — Guardrail (PII redaction)"
  3. Any credentials the nodes need are ${credential.…} references — add them once in Admin → Credentials and the template picks them up. Nothing secret ships in a template.
The workflow document (flowdrome.workflow.v1, 4 node types)
{
  "schemaVersion": "flowdrome.workflow.v1",
  "id": "",
  "name": "AI · 05 — Guardrail (PII redaction)",
  "version": "0",
  "status": "draft",
  "nodes": [
    {
      "id": "seed",
      "type": "input.inject",
      "label": "Risky text",
      "category": "trigger",
      "config": {
        "contentType": "application/json",
        "payload": {
          "text": "Refund ada@example.com (call 555-0142) on card 4111 1111 1111 1111 please."
        }
      },
      "position": {
        "x": 0,
        "y": 23
      }
    },
    {
      "id": "keep",
      "type": "processing.set",
      "label": "Keep original",
      "category": "processing",
      "config": {
        "mode": "manual",
        "assignments": [
          {
            "name": "original",
            "type": "string",
            "value": "{{ $json.text }}"
          }
        ],
        "include": "all",
        "dotNotation": true,
        "ignoreConversionErrors": false
      },
      "position": {
        "x": 530,
        "y": 23
      }
    },
    {
      "id": "guard",
      "type": "processing.guardrail",
      "label": "Redact PII",
      "category": "ai",
      "config": {
        "checks": [
          "pii"
        ],
        "mode": "redact",
        "piiTypes": [
          "email",
          "phone",
          "creditcard"
        ],
        "textField": "text",
        "blocklist": [],
        "outputField": "text"
      },
      "position": {
        "x": 1060,
        "y": 23
      }
    },
    {
      "id": "out",
      "type": "utility.console",
      "label": "Before / after",
      "category": "utility",
      "config": {
        "message": "BEFORE: {{ $json.original }}\nAFTER:  {{ $json.text }}"
      },
      "position": {
        "x": 1590,
        "y": 0
      }
    }
  ],
  "edges": [
    {
      "id": "e0",
      "sourceNodeId": "seed",
      "sourcePort": "output",
      "targetNodeId": "keep",
      "targetPort": "input"
    },
    {
      "id": "e1",
      "sourceNodeId": "keep",
      "sourcePort": "output",
      "targetNodeId": "guard",
      "targetPort": "input"
    },
    {
      "id": "e2",
      "sourceNodeId": "guard",
      "sourcePort": "output",
      "targetNodeId": "out",
      "targetPort": "input"
    }
  ],
  "triggers": [
    {
      "id": "t0",
      "nodeId": "seed"
    }
  ],
  "meta": {
    "snippets": [],
    "source": "template-gallery",
    "description": "Deterministic safety — no model needed. The Guardrail scrubs emails, phone numbers and card numbers from text before it reaches an AI (or a log). The Console shows before vs after."
  }
}

Generated from the verified demo corpus — this exact document seeds and runs on a fresh Flowdrome. Raw JSON: ai-05-guardrail-pii-redaction.json.