
Email-to-Booklet: Parse, Personalize, and Merge Legal PDFs with n8n + PDF.co
6 MIN READ
5 MIN READ
What You'll Have When Done: An automated system that monitors Google Drive for confidential documents, redacts all sensitive information (SSN, credit cards, addresses, etc.), and saves the cleaned PDFs to a secure folder.
Before you begin, make sure you have:
Option A: I Want It Working Now
Option B: I Want to Build It Step-by-Step
Follow the 6-step guide below to create the automation from scratch:
Node: Google Drive Trigger → File Created
Settings:
Changes Involving a Specific FolderYOUR_CONFIDENTIAL_FOLDERFile CreatedSuccess Looks Like: The trigger fires whenever a new PDF is added to your confidential folder. The file metadata is passed to the next node.
Node: Google Drive → Download
Settings:
Download{{ $json.id }}Success Looks Like: The PDF file is downloaded as binary data, ready for processing.
Node: PDF.co → Upload File
Settings:
Truefile.pdfSuccess Looks Like: The file is uploaded to PDF.co's temporary storage. You receive a URL for the uploaded file.
Node: PDF.co → Search & Replace Text or Delete
Settings:
{{ $json.url }}(?<=Name:\s)[A-Za-z\s]+(?=\s*Email)
(?<=Email:\s)[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}
(?<=Phone:\s)\([0-9]{3}\)\s[0-9]{3}-[0-9]{4}
(?<=SSN:\s)[0-9]{3}-[0-9]{2}-[0-9]{4}
(?<=Date of Birth:\s)[A-Za-z]+\s+\d{1,2},\s+\d{4}
(?<=Address:\s)[0-9]+\s[A-Za-z0-9\s,]+(?=\s*Credit Card)
(?<=Credit Card:\s)[0-9]{4}-[0-9]{4}-[0-9]{4}-[0-9]{4}
(?<=Employee ID:\s)EMP-[0-9]{4}-[0-9]{3}
(?<=Salary:\s)\$[0-9,]+0True{"UsePatch": true, "PatchColor": "#000000"}Success Looks Like: All sensitive data is replaced with black redaction boxes. The output URL points to the redacted PDF.
Node: HTTP Request
Settings:
GET{{ $json.url }}Success Looks Like: The redacted PDF is downloaded as binary data, ready to be saved.
Node: Google Drive → Upload
Settings:
dataYOUR_REDACTED_FILE_FOLDERSuccess Looks Like: The redacted PDF appears in your secure folder with all sensitive information removed.
Congrats! You've automated a compliant document redaction system that protects sensitive data automatically.
Built something cool? Share it with us @pdfdotco

6 MIN READ

6 MIN READ

6 MIN READ

6 MIN READ
Create an account, get an API key and test a request.