<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mykola Melnyk</title>
    <description>The latest articles on DEV Community by Mykola Melnyk (@mykola_melnyk_ml).</description>
    <link>https://dev.to/mykola_melnyk_ml</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4082372%2F697b1ae8-84e9-4705-884a-5142627d34c1.jpg</url>
      <title>DEV Community: Mykola Melnyk</title>
      <link>https://dev.to/mykola_melnyk_ml</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mykola_melnyk_ml"/>
    <language>en</language>
    <item>
      <title>Automating PDF Redaction in n8n (No Custom API Code Required)</title>
      <dc:creator>Mykola Melnyk</dc:creator>
      <pubDate>Tue, 18 Aug 2026 09:55:15 +0000</pubDate>
      <link>https://dev.to/mykola_melnyk_ml/automating-pdf-redaction-in-n8n-no-custom-api-code-required-3561</link>
      <guid>https://dev.to/mykola_melnyk_ml/automating-pdf-redaction-in-n8n-no-custom-api-code-required-3561</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fs3x725kxvniakl60g0cu.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fs3x725kxvniakl60g0cu.jpg" alt="Complete workflow: Manual Trigger → HTTP Request → PDF Redaction, all executed successfully" width="800" height="451"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you run n8n workflows that touch PDFs — invoices, contracts, HR forms, scanned intake documents — sooner or later you hit the same wall: someone downstream doesn't need to see the names, emails, or ID numbers in that file. Maybe it's going to a shared drive, a support ticket, an analytics pipeline, or a third-party API you'd rather not hand raw PII to.&lt;/p&gt;

&lt;p&gt;The usual fix is writing a custom &lt;code&gt;HTTP Request&lt;/code&gt; call to some redaction API, wiring up auth headers, and hand-rolling the JSON body every time. There's now a community node that skips that step: &lt;a href="https://www.npmjs.com/package/@stabrise/n8n-nodes-pdf-redaction" rel="noopener noreferrer"&gt;&lt;code&gt;@stabrise/n8n-nodes-pdf-redaction&lt;/code&gt;&lt;/a&gt;, which drops PDF redaction straight into the node panel.&lt;/p&gt;

&lt;p&gt;This post walks through installing it and building a small end-to-end workflow.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the node actually does
&lt;/h2&gt;

&lt;p&gt;It wraps the &lt;a href="https://pdf-redaction.com" rel="noopener noreferrer"&gt;PDF Redaction&lt;/a&gt; API in three operations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Anonymize&lt;/strong&gt; — pick PII categories (names, emails, addresses, credit cards, faces, signatures, and more) and get back a redacted PDF where the matched content is genuinely removed, not just covered with a black box.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Anonymize with Custom Prompt&lt;/strong&gt; — skip the tag list and describe what to redact in plain English, e.g. &lt;code&gt;"redact anything that looks like an internal project codename"&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Detect PII&lt;/strong&gt; — scan a document and get back the entities found (with bounding boxes), without touching the file. Useful for an audit step or for branching a workflow before you commit to redacting anything.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Both digital and scanned/OCR'd PDFs are supported, across multiple languages.&lt;/p&gt;

&lt;h2&gt;
  
  
  Install
&lt;/h2&gt;

&lt;p&gt;In n8n: &lt;strong&gt;Settings → Community Nodes → Install&lt;/strong&gt;, then enter:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@stabrise/n8n-nodes-pdf-redaction
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That requires n8n 1.60.0+. Once it's installed, "PDF Redaction" shows up as a node, and "PDF Redaction API" shows up as a credential type.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frikzux3h5xskcwf9powg.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frikzux3h5xskcwf9powg.jpg" alt="Install community node dialog with the package name filled in" width="800" height="478"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Get an API key
&lt;/h2&gt;

&lt;p&gt;Grab a free key at &lt;a href="https://pdf-redaction.com/apikeys/" rel="noopener noreferrer"&gt;pdf-redaction.com/apikeys&lt;/a&gt; — the free tier gives you 100 pages/month, 10 pages per request, 5 requests/minute, which is plenty for testing a workflow. In n8n, create a new &lt;strong&gt;PDF Redaction API&lt;/strong&gt; credential and paste the key in.&lt;/p&gt;

&lt;h2&gt;
  
  
  Build a minimal workflow
&lt;/h2&gt;

&lt;p&gt;Here's a three-node workflow that fetches a public sample PDF and redacts a face in it — you can reproduce this exactly, no files of your own needed:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Manual Trigger&lt;/strong&gt; → &lt;strong&gt;2. HTTP Request&lt;/strong&gt; → &lt;strong&gt;3. PDF Redaction&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;HTTP Request node config:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Method: &lt;code&gt;GET&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;URL: &lt;code&gt;https://raw.githubusercontent.com/StabRise/pdf-redaction-api/main/examples/pdfs/SampleWithFace.pdf&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Options → Response → Response Format: &lt;code&gt;File&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That writes the PDF as binary data into a field called &lt;code&gt;data&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;PDF Redaction node config:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Credential: your PDF Redaction API credential&lt;/li&gt;
&lt;li&gt;Operation: &lt;code&gt;Anonymize&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Additional Fields → Tags: &lt;code&gt;Face&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Input/Output Binary Field: &lt;code&gt;data&lt;/code&gt; (the defaults line up with what HTTP Request produced, no renaming needed)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcm4pas7n58a6ajfwpfvq.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcm4pas7n58a6ajfwpfvq.jpg" alt="PDF Redaction node configured with the Anonymize operation and Face tag, reading input from the HTTP Request node" width="800" height="451"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Run it, and the output panel gives you two things:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A binary &lt;code&gt;redacted.pdf&lt;/code&gt; with the face blacked out and the underlying pixel data actually removed.&lt;/li&gt;
&lt;li&gt;A JSON payload with &lt;code&gt;detected_pii&lt;/code&gt; (each match plus bounding box coordinates) and a &lt;code&gt;processing_time&lt;/code&gt; breakdown per pipeline stage.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmlb2w2k2wvj36xzuhq1n.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmlb2w2k2wvj36xzuhq1n.jpg" alt="Rendered page of the redacted PDF, showing both faces blacked out" width="800" height="1132"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The original 823 kB file comes back at 377 kB — the API flattens the processed page(s) into a compact PDF rather than just painting over them.&lt;/p&gt;

&lt;p&gt;Swap the tag to something like &lt;code&gt;Person Name, Email, Address&lt;/code&gt; and you've got a general-purpose PII stripper for whatever document type flows into that branch of your workflow.&lt;/p&gt;

&lt;h2&gt;
  
  
  Detect-then-branch pattern
&lt;/h2&gt;

&lt;p&gt;If you don't want to redact unconditionally, put a &lt;strong&gt;Detect PII&lt;/strong&gt; node in front of an &lt;strong&gt;IF&lt;/strong&gt; node:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;HTTP Request → PDF Redaction (Detect PII) → IF (detected_pii is non-empty) → PDF Redaction (Anonymize)
                                                                            → (pass through unchanged)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;Detect PII&lt;/code&gt; has no output binary field — it only returns the &lt;code&gt;detected_pii&lt;/code&gt; array — so it's cheap to run as a gate before you decide whether the full anonymize step is even necessary. This is the pattern I'd reach for in something like a document-intake pipeline where most files are already clean and you don't want to touch every single one.&lt;/p&gt;

&lt;p&gt;One gotcha worth calling out: if you leave the &lt;strong&gt;Tags&lt;/strong&gt; field empty on &lt;code&gt;Detect PII&lt;/code&gt;, you get back whatever the API detects by default, not everything it's capable of finding. Set the tags you actually care about explicitly if you want predictable results.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fnu1nr66r3nvzcu6rlyj5.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fnu1nr66r3nvzcu6rlyj5.jpg" alt="PDF Redaction node configured with the Detect PII operation and Date, Email, Person Name tags" width="800" height="478"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Where this fits
&lt;/h2&gt;

&lt;p&gt;The node reads/writes n8n's standard binary data fields, so anything that can already put a PDF into a binary property works upstream — a webhook payload, an email trigger with an attachment, Read/Write File from Disk, or an S3/Google Drive node. Nothing about the redaction step cares where the PDF came from.&lt;/p&gt;

&lt;p&gt;Full API reference, the complete tag list, and more tutorials (including custom-prompt redaction) are in the &lt;a href="https://pdf-redaction.com/docs/integrations/n8n/" rel="noopener noreferrer"&gt;n8n integration docs&lt;/a&gt;. Source for the node itself is on &lt;a href="https://github.com/StabRise/n8n-nodes-pdf-redaction" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>n8n</category>
      <category>automation</category>
      <category>privacy</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
