
Email-to-Booklet: Parse, Personalize, and Merge Legal PDFs with n8n + PDF.co
6 MIN READ
What You'll Have When Done: A fully automated system that monitors your Google Drive for PDF417 barcode images (like airline boarding passes), extracts all the encoded data, parses flight information, and automatically adds structured data to your Google Sheets for easy tracking and management.
Before you begin, make sure you have:
Follow the 5-step guide below to create the automation from scratch.
Node: Google Drive Trigger
Settings:
Changes Involving a Specific FolderFile CreatedWhat This Does: Automatically detects when new PDF417 barcode images (like boarding pass screenshots) are uploaded to your specified Google Drive folder.
Success Looks Like: The trigger activates immediately when a new image or PDF is uploaded.
Important: Make sure the file sharing setting is set to “Anyone with the link” so that PDF.co can access the file.
Node: PDF.co API → Barcode Reader
Settings:
={{ $json.webContentLink }} (from the Google Drive trigger)PDF417What This Does: Takes the uploaded image and uses PDF.co's Barcode Reader to extract the encoded data from PDF417 barcodes, commonly found on airline boarding passes.
Success Looks Like: PDF.co processes the image and returns a URL containing the extracted barcode data string.
Node: HTTP Request
Settings:
GET={{ $json.url }} (from the PDF.co barcode reader step)What This Does: Downloads the barcode extraction results from PDF.co's servers, providing access to the raw BCBP data string.
Success Looks Like: The raw barcode data is downloaded and ready for parsing into structured flight information.
Node: Code → JavaScript
To handle the parsing, you'll need a custom JavaScript function. Download the parser script here and paste it into your Code node.
What This Does: Parses the raw BCBP (Bar Coded Boarding Pass) string to extract the passenger name, flight details, dates, seat assignments, and confirmation codes into a structured format.
Success Looks Like: The raw barcode string is converted into clean, readable data with proper formatting for names, dates, and flight information.
Node: Google Sheets → Append Row
Settings:
={{ $json.clientName }}={{ $json.flightNumber }}={{ $json.travelDate }}={{ $json.route }}={{ $json.seat }}={{ $json.confirmationCode }}={{ $json.processedDate }}What This Does: Takes the parsed flight information and automatically adds a new row to your Google Sheets with all the extracted data, creating an organized travel log.
Success Looks Like: Each processed boarding pass appears as a new row in your spreadsheet with properly formatted flight information, passenger details, and processing timestamps.
Congratulations! You've created a fully automated PDF417 barcode processing system that can extract flight information from boarding pass images and PDFs and organize it in Google Sheets.
Built something cool with this workflow? 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.