Gmail PDF Invoice & PO Extract to XML CSV JSON | n8n
Gmail PDF Invoice & PO Extract to XML CSV JSON | n8n
Regular price
£38.99
Regular price
£38.99
Sale price
Unit price
/
per
⬇
Instant Digital Download
∞
Unlimited Downloads
★
Lifetime Access in Your Account
Couldn't load pickup availability
🔥
128+ Sold
Popular with n8n builders
⚡
23 people viewing
High interest right now
✅
9 added today
Fast-moving digital product
Gmail PDF Invoice & PO Extract to XML CSV JSON | n8n
Regular price
£38.99
Regular price
£38.99
Sale price
Unit price
/
per
Turn Gmail invoice & PO PDFs into ERP-ready XML, CSV, and JSON automatically
This n8n workflow monitors your Gmail for unread invoice or purchase order PDF attachments, extracts their text, validates key fields and line-item totals, and outputs structured XML, CSV, and JSON files—while alerting a reviewer when something doesn’t match the rules.
What this workflow does
- Polls Gmail every 15 minutes for unread messages matching a configurable PDF invoice/PO search query, then downloads attachments.
- Splits and processes PDF attachments and extracts selectable text from each PDF.
- Detects document type (invoice vs purchase order) and parses header fields such as document numbers, dates, vendor, and currency.
- Parses line items and totals, then performs rule-based validation of required fields.
- Validates calculations by checking line-item math and subtotal/tax/total consistency.
- Flags duplicates using workflow static data to avoid re-processing the same document.
- Outputs structured files for valid documents: generates ERP-style XML, plus CSV and JSON per document.
- Handles exceptions by sending a Gmail message to a reviewer email with validation errors and key extracted values.
- Marks the original Gmail message as read so it won’t be processed again (skipping the built-in sample run).
Use cases
- SaaS operations teams routing invoice/PO PDFs from suppliers directly into downstream ERP formats.
- Automation engineers building a reliable invoice-to-data pipeline with validation and human review for edge cases.
- Finance teams reducing manual copying by converting Gmail PDF invoices/POs into XML/CSV/JSON for ingestion.
Technical details
- Gmail trigger (OAuth2) for polling unread invoice/PO PDFs and actions to mark messages as read.
- Parsing and control flow using if, set, code, filter, and documentation/flow notes via sticky note.
Optional: upload the generated XML/CSV/JSON files to a specified Google Drive folder.
