Procurement teams receive purchase orders by email all day. Someone opens the attachment, manually pulls out the vendor name, PO number, every line item, quantities, unit prices, subtotal, tax, shipping, grand total — then figures out who needs to approve it based on the amount. For a finance or ops team processing dozens of POs a week, that intake work alone is a significant chunk of someone’s job.
Built a workflow that handles PO intake automatically the moment the email hits Gmail.
What it does
PO email arrives in Gmail → downloads attachment → extracts all order data → calculates approval level → flags urgency by delivery date → logs to tracker → notifies procurement team on Slack
Takes about 10-12 seconds per PO.
What gets extracted
Order identification:
- PO number, order date, required delivery date
Vendor:
- Name, address, contact name, email, phone
Addresses:
-
Ship-to (name, address, attention line)
-
Bill-to (name, address)
Line items (full array):
-
Line number, item number, description
-
Quantity, unit, unit price, line total
Financials:
- Subtotal, shipping cost, tax, grand total
Terms:
- Payment terms, shipping method, notes
Approval routing
The Code node calculates the grand total and assigns an approval level automatically:
-
Under $1,000 → Auto-Approve
-
$1,000 – $4,999 → Manager Approval
-
$5,000 – $24,999 → Director Approval
-
$25,000 and above → VP/CFO Approval
Urgency detection
If the PO includes a required delivery date, the workflow calculates days until delivery:
-
3 days or less → Urgent
-
4–7 days → High
-
More than 7 days → Normal
Both approval level and urgency appear in the Slack notification so the right person sees it immediately.
What lands in Slack
📦 New Purchase Order Received
Tracking: PO-MX4F2K
PO Number: PO-2025-00847
Vendor: Acme Supply Co.
📋 Line Items: 4
3 x Office Chairs @ $285 = $855
10 x Standing Desk Mats @ $45 = $450
1 x Ergonomic Monitor Arm @ $120 = $120
2 x Cable Management Kits @ $35 = $70
💰 Total: $1,650.00
📅 Required By: 2025-03-20
🔐 Approval Required: Manager Approval
⚡ Urgency: High
What lands in Google Sheets
Each row: Tracking ID, PO Number, Vendor, Order Date, Required Date, Line Items (count), Subtotal, Shipping, Tax, Grand Total, Approval Level, Urgency, Status, Received Date
Status is set to “Pending Approval” automatically. Filter by Approval Level to see the VP queue vs manager queue. Filter by Urgency to prioritize time-sensitive orders.
Setup
You’ll need:
-
Gmail (where POs arrive)
-
Google Sheets (free)
-
n8n instance (self-hosted — uses PDF Vector community node)
-
PDF Vector account (free tier: 100 credits/month, ~25-30 documents)
-
Slack (for procurement team notifications)
About 15 minutes to configure.
Download
Workflow JSON:
Full workflow collection:
Setup Guide
Step 1: Get your PDF Vector API key
Sign up at pdfvector.com — free plan works for testing. Go to API Keys and generate a key.
Step 2: Create your Google Sheet
Headers in Row 1:
Tracking ID | PO Number | Vendor | Order Date | Required Date | Line Items | Subtotal | Shipping | Tax | Grand Total | Approval Level | Urgency | Status | Received Date
Step 3: Import the workflow
Download the JSON from GitHub and import into n8n via Import from File.
Step 4: Configure the nodes
Gmail Trigger:
-
Connect Gmail account (OAuth2)
-
Add a label filter for emails from vendors or your procurement inbox
Get a message:
-
Same Gmail credential
-
Downloads attachments automatically
PDF Vector - Extract PO:
-
Add new credential (Bearer Token)
-
Paste your API key
-
Uses
attachment_0— correct for Gmail attachments
Process PO:
-
No config needed — approval routing and urgency detection run automatically
-
To change approval thresholds, edit the amount values in the Code node
Log to PO Tracker:
-
Connect Google Sheets
-
Paste your Sheet ID
Notify Procurement:
-
Connect Slack
-
Select your procurement or finance channel
Step 5: Test it
Send yourself a test email with a PO PDF attached. Check your Sheet and Slack after about 30 seconds.
Accuracy
Tested on POs from ERP systems (SAP, Oracle, QuickBooks), standard procurement templates, and supplier-generated PDFs.
-
PO number, vendor name, grand total: ~97% on digital PDFs
-
Line items (description, quantity, unit price): ~94% on structured table formats
-
Line item totals: ~96% — calculated and cross-checked automatically
-
Dates (order date, required date): ~93%
-
Payment terms and shipping method: ~89% — sometimes embedded in footer text
Scanned or photographed POs: accuracy drops to ~75-80%. Digital PDFs from ERP systems work best.
Cost
Each PO uses 3-4 PDF Vector credits. Free tier of 100 credits handles roughly 25-30 POs per month.
Basic plan is $25/month for 3,000 credits — covers a busy procurement team.
Customizing it
Adjust approval thresholds:
In the Code node, find the approvalLevel block. Change the 25000, 5000, and 1000 values to match your organization’s policy.
Route to different Slack channels by approval level:
Replace the single Slack node with an IF or Switch node that routes VP-level POs to a separate channel from manager-level ones.
Add email acknowledgment to vendor:
After logging to Sheets, add a Gmail node to auto-reply to the sender confirming their PO was received with the tracking ID.
Connect to an ERP or procurement system:
Replace or supplement the Sheets node with an HTTP Request node to create PO records in your existing system — SAP, Oracle, NetSuite, or any system with an API.
Multi-attachment handling:
If vendors send POs with multiple attachments, loop through attachment_0, attachment_1, etc. using a loop node before the PDF Vector node.
Limitations
-
Requires self-hosted n8n (PDF Vector is a community node)
-
Only processes
attachment_0— multi-attachment emails need extra handling -
Approval routing is amount-based only — doesn’t factor in vendor category or department budget
-
No duplicate detection — the same PO resent by a vendor creates a new row
-
Urgency calculation is point-in-time — doesn’t update as delivery date approaches
Questions? Drop a comment.
