anymize

anymize custom nodes

Documentation

anymize n8n Node

A custom n8n node for integrating with anymize.ai's GDPR-compliant document anonymization service. This node allows you to anonymize and deanonymize text and files directly within your n8n workflows.

Overview

The anymize node provides two main functionalities:

  • Anonymize: Automatically detect and anonymize personally identifiable information (PII) in text or documents
  • Deanonymize: Restore original data from previously anonymized content using anymize's bidirectional anonymization technology

Features

  • 🔒 GDPR-compliant anonymization with >95% detection rate
  • 📄 Multi-format support: Text, PDF and images (PNG, JPG, TIFF) via OCR
  • 🔄 Bidirectional anonymization: Safely restore original data when needed
  • 🌍 Multi-language support: German, English, and other languages
  • ⚡ Asynchronous processing: Handles large documents efficiently
  • 🔗 Seamless n8n integration: Easy drag-and-drop workflow integration

Installation

Prerequisites

Method 1: Manual Installation (Recommended for self-hosted n8n)

  1. Clone or download this package to your n8n custom nodes directory:

    cd ~/.n8n/custom
    git clone <your-repository-url> anymize-node
    
  2. Install dependencies (if any):

    cd anymize-node
    npm install
    
  3. Restart n8n:

    n8n start
    

Method 2: Community Package Installation

Note: This method will be available once the package is published to npm.

  1. Go to Settings → Community Nodes in your n8n interface
  2. Search for n8n-nodes-anymize
  3. Click Install

Configuration

1. Set up API Credentials

  1. In your n8n workflow, add the anymize node
  2. Click on Credential for anymize API
  3. Create new credentials:
    • Name: anymize API (or any name you prefer)
    • API Key: Your anymize.ai API key

2. Basic Node Configuration

The anymize node offers two main resources:

Anonymize Resource

  • Text Anonymization: Direct text input
  • File Anonymization: Upload documents via binary data

Deanonymize Resource

  • Text Deanonymization: Restore anonymized text to original content

Job Resource (node version 1.1+)

  • Get Status: Get the status and result of a job, e.g. after running Anonymize with Wait for Completion turned off
  • Get Placeholder Mapping: Get the mapping between placeholders and original values (hash_pairs). Not available with Zero Data Retention
  • Export: Download a completed job as PDF or TXT, with anonymized or original text, into a binary field

Chat Resource (node version 1.1+)

  • Anonymous Chat: Send a prompt to an LLM. anymize anonymizes personal data before the model call and restores it in the answer. Choose the model from the list (e.g. waterfall-2.0). Options: system prompt, language, temperature, maximum tokens. Simplify Output returns only the answer text, job_id, model and token usage

Anonymous chat uses LLM credits plus anonymization credits.

Transcription Resource (node version 1.1+)

  • Transcribe Audio: Transcribe an audio file (MP3, WAV, M4A, OGG, WEBM) from a binary field. Transcript mode returns text only (max. 100 MB); Meeting mode adds speaker detection, a title and a summary (max. 250 MB). Options: language (or auto-detect), speaker detection, timestamps, recognition prompt, context bias (names to spell correctly), and Anonymize. With Wait for Completion turned off, the transcription ID is returned immediately
  • Get: Get the status and result of a transcription
  • Get Many: List transcriptions, filtered by mode or status

Knowledge Base Resource (node version 1.1+)

  • Create, Get, Get Many, Delete: Manage knowledge bases. Deleting removes embeddings and chunks; original documents are kept
  • Upload File: Add a file from a binary field (PDF, DOCX, PPTX, XLSX, TXT, MD, CSV, HTML, JSON, images; max. 100 MB, 30 files per knowledge base), optionally anonymized first
  • Get Documents: List the documents of a knowledge base
  • Search: Search a fully processed knowledge base with a natural-language query. Options: number of results, hierarchy, reranking

Only anonymized uploads use credits; other uploads and searches are free.

anymize Chat Model (AI sub-node)

Connect the anymize Chat Model to n8n's AI Agent, Basic LLM Chain or any other node that accepts a chat model.

  • Anonymize Personal Data (on by default): requests go through anymize's anonymous endpoint (/api/v1/llm-anonymous). Personal data is replaced with placeholders before it reaches the model and restored in the answer. Turn it off to use the standard endpoint (/api/v1/llm)
  • Model: choose from the models available to your account (e.g. waterfall-2.0, fountain-2.0)
  • Options: language (for anonymization), sampling temperature, maximum tokens, top P, frequency and presence penalty, JSON response format, timeout, max retries

With anonymization on, each call uses LLM credits plus anonymization credits (1 word = 1 credit).

Known limitation – AI Agents with tools: anymize's anonymous endpoint currently returns 400 The model is temporarily unavailable as soon as a conversation contains a tool result, so an AI Agent fails after its first tool call when Anonymize Personal Data is on. Agents without tools and Basic LLM Chains work. For agents that use tools, turn Anonymize Personal Data off until the API supports tool results; personal data then reaches the model unmasked, so anonymize sensitive input beforehand (e.g. with the anymize node's Anonymize operation).

anymize Embeddings (AI sub-node)

Connect the anymize Embeddings to an n8n vector store (e.g. Pinecone, Qdrant, PGVector, In-Memory) to embed documents and queries.

  • Model: voyage-4-lite (texts are processed by Voyage AI)
  • Queries and documents are embedded with the matching input_type, which improves search results
  • Options: dimensions (256, 512, 1024 or 2048; must match your vector store index), batch size, timeout, max retries

Node versions

Existing workflows keep node version 1, which behaves exactly as before. Newly added nodes use version 1.1, which uses the current API endpoints, respects the node's On Error setting, and offers the Job, Chat, Transcription and Knowledge Base resources.

Development

pnpm install
pnpm lint
pnpm test     # unit tests (vitest)
pnpm build

CI runs these on every push and pull request, and loads the packed node with several n8n-workflow versions (minimum, latest n8n 1.x and the current n8n release). Pushing a tag that equals the package version (e.g. 1.2.0) publishes to npm with provenance via npm Trusted Publishing.

Usage Examples

Example 1: Basic Text Anonymization

Workflow: Simple text anonymization for GDPR compliance

// Input text containing PII
'Dear Mr. John Smith, your appointment at 123 Main Street on 2024-01-15 is confirmed. Please call us at +49-123-456789.';

// Output (anonymized)
'Dear Mr. [[PER-a1b2c3]], your appointment at [[ADR-d4e5f6]] on [[DAT-g7h8i9]] is confirmed. Please call us at [[PHO-j0k1l2]].';

Node Configuration:

  • Resource: Anonymize
  • Operation: Text
  • Text to Anonymize: {{ $json.message }}
  • Language: en

Example 2: File Anonymization with OCR

Workflow: Process uploaded PDF invoices containing customer data

Setup:

  1. HTTP Request node to receive file upload
  2. anymize node for anonymization
  3. Send response with anonymized content

Node Configuration:

  • Resource: Anonymize
  • Operation: File
  • Binary Property Name: data (from HTTP Request node)

Example 3: Bidirectional Workflow

Workflow: Anonymize data for AI processing, then restore results

Setup:

  1. anymize (Anonymize) →
  2. HTTP Request (Send to ChatGPT/Claude) →
  3. anymize (Deanonymize)

Anonymize Node:

  • Resource: Anonymize
  • Operation: Text
  • Text to Anonymize: {{ $json.customerData }}

Deanonymize Node:

  • Resource: Deanonymize
  • Operation: Text
  • Text to Deanonymize: {{ $json.aiResponse }}

Example 4: Bulk Document Processing

Workflow: Process multiple legal documents from Google Drive

graph LR
    A[Google Drive Trigger] --> B[For Each Document]
    B --> C[anymize: File Anonymization]
    C --> D[ChatGPT Analysis]
    D --> E[anymize: Deanonymize]
    E --> F[Save to Database]

Advanced Configuration

Custom System Prompts

When anonymizing text, the node automatically generates system prompts for LLM usage:

// Access the generated system prompt
{
	{
		$json.systemprompt;
	}
}

Language Support

Supported languages:

  • de - German (default)
  • en - English
  • fr - French
  • es - Spanish
  • And more...

Best Practices

1. Security

  • Store API keys securely using n8n's credential system

2. Workflow Design

// Good: Chain operations efficiently
Trigger → Anonymize → External API → Deanonymize → Store

// Avoid: Unnecessary intermediate steps
Trigger → Transform → Anonymize → Transform → API → Transform → Deanonymize → Store

Troubleshooting

Common Issues

Issue: "Authentication failed"
Solution: Verify your API key is correct

Issue: "File processing timeout"
Solution: Increase timeout settings or use smaller files

Issue: "Invalid binary data"
Solution: Ensure the binary property name matches your input node

Support

Example Workflows

Workflow 1: Customer Support Automation

{
	"name": "GDPR-Compliant Customer Support",
	"nodes": [
		{
			"name": "Webhook",
			"type": "n8n-nodes-base.webhook"
		},
		{
			"name": "anymize",
			"type": "anymizeNode",
			"parameters": {
				"resource": "anonymize",
				"operation": "text",
				"textToAnonymize": "={{ $json.customerMessage }}"
			}
		},
		{
			"name": "OpenAI GPT",
			"type": "n8n-nodes-base.openAi"
		},
		{
			"name": "anymize",
			"type": "anymizeNode",
			"parameters": {
				"resource": "deanonymize",
				"operation": "text",
				"textToDeanonymize": "={{ $json.choices[0].message.content }}"
			}
		}
	]
}

Workflow 2: Legal Document Analysis

{
	"name": "Legal Document Anonymization",
	"nodes": [
		{
			"name": "Google Drive Trigger",
			"type": "n8n-nodes-base.googleDrive"
		},
		{
			"name": "anymize - File Anonymization",
			"type": "anymizeNode",
			"parameters": {
				"resource": "anonymize",
				"operation": "file",
				"binaryPropertyName": "data"
			}
		},
		{
			"name": "Claude AI Analysis",
			"type": "n8n-nodes-base.anthropic"
		},
		{
			"name": "anymize - Restore Results",
			"type": "anymizeNode",
			"parameters": {
				"resource": "deanonymize",
				"operation": "text",
				"textToDeanonymize": "={{ $json.content[0].text }}"
			}
		}
	]
}

Need Help?

For technical support or questions about this n8n node, please:

  1. Check the API documentation
  2. Review this README and examples

Discussion