# Redact PII with n8n

> Add a redaction step to any n8n workflow with the HTTP Request node, before a node sends data to an AI model.

Canonical: https://bitbanger.in/integrations/n8n
Last updated: 2026-10-27

n8n workflows often route customer text straight into an AI node. Insert an HTTP Request node before that step and the model receives labels instead of personal data.

## Code

```
{
  "method": "POST",
  "url": "https://api.bitbanger.in/v1/redact",
  "authentication": "genericCredentialType",
  "genericAuthType": "httpHeaderAuth",
  "sendHeaders": true,
  "headerParameters": {
    "parameters": [{ "name": "X-API-Key", "value": "{{ $credentials.redactlyApiKey }}" }]
  },
  "sendBody": true,
  "specifyBody": "json",
  "jsonBody": "={{ JSON.stringify({ text: $json.body, style: 'replace' }) }}",
  "options": {}
}
```

## Notes

- Create a Header Auth credential holding X-API-Key, then reference it from the node instead of pasting the key.
- Feed $json.redacted into the downstream AI node rather than $json.body.
- The node returns entities as well, so you can branch on whether anything was found.

## Related

- [API reference](https://bitbanger.in/docs)
- [Playground](https://bitbanger.in/redact)
- [All 40 entity types](https://bitbanger.in/entities/)
