SoterAI icon

SoterAI

Detect prompt injection, jailbreaks, secrets, PII, and unsafe AI instructions in n8n workflows

Guardrail → Redact Secrets or PII

AI-generated

Summary

Scans text for PII using SoterAI's detection engine and returns a sanitized copy while optionally flagging redacted items.

Inputs

  • detectionEngine (required) — Where checks run: Auto (cloud first, local fallback), Cloud Only (fails if cloud unavailable), or Local Only (bundled rules, no network).
  • piiText (required) — The text to scan and redact PII from. Use {{ $.outputText }} from this node for the cleaned copy.
  • ignoredEntities — Identifier types to leave unredacted (e.g., Email, Phone, US_SSN). Leave empty to redact everything; credentials can never be ignored.
  • ignoredWords — Literal words or phrases to leave unredacted (case-insensitive). A line containing an API key, token, or private key is refused, not kept.
  • branchOnRedaction — Whether to split unchanged items onto a Clean output and sanitized items onto a Redacted output.
  • includeRawResponse — Whether to attach the full API response as rawResponse (recursively sanitized first).
  • batchConcurrency — How many input items to check at the same time (1-20). Output order is preserved.
  • metadata — JSON object attached to the request for audit logging. Secrets and long strings are redacted before sending.
  • neverDowngradeToLocal — In Auto mode, fail an item instead of answering with the local engine when the cloud cannot be reached.
  • projectId — SoterAI project ID, overriding the one set on the credential.
  • requestTimeoutMs — Total time budget for each API call, including rate-limit retries and waits (1-120000 ms).
  • reuseIdenticalItems — Whether two identical items in the same execution reuse one API call.
  • sessionId — Stable per-conversation ID. Without it each message is judged alone.

Output shape

A single record containing the sanitized text in {{ $.outputText }}. If Branch On Redaction is enabled, output items are split into Clean and Redacted streams.

Credentials (API keys, tokens, private keys) are never redacted, even if ignored in settings. The raw API response can be included as rawResponse.

Examples

Example 1: Basic PII Redaction

Set detection engine to Auto, input text field, and leave ignoredEntities empty to redact all PII.

Example 2: Split Clean and Redacted Items

Enable Branch On Redaction to separate items that required changes from those that were already clean.

Example 3: Audit-Ready Redaction

Include rawResponse and populate metadata JSON for audit logging while keeping run data smaller by excluding rawResponse when not needed.

Links

Discussion