Skip to content
NEWMeet Alaaddin, your AI genie with a voice. trig8n launches 1 January 2027. See what is new

Library / Email Automation

Email Automation

Extract invoice data from Gmail to Google Sheets with PDF.co AI invoice parser

When a new email arrives, it handles email using Gmail, Google Sheets, PDFco Api.

What it does

## Extract invoice data from Gmail to Google Sheets with PDF.co AI Invoice Parser Every PDF invoice that lands in a Gmail label is parsed by PDF.co's AI Invoice Parser. Clean invoices are logged to Google Sheets with their line items. Anything doubtful is labeled for review instead of being logged. You get an email alert for big totals, upcoming due dates and invoices that need a manual check. ### How it works 1. Collect: The Gmail trigger watches the Invoices label and skips emails already labeled Processed or Needs Review. Every PDF attachment becomes its own item; logos and other images are ignored. 2. Parse: Each PDF is uploaded to PDF.co. If a file holds several invoices, it is split at each page containing the split text (default Invoice Number). Each invoice then goes through the AI Invoice Parser. 3. Check: Each result is checked against the sheet and the rest of the batch. It goes to review if the invoice number or total is missing, the same vendor + invoice number is already logged, or PDF.co could not read the file. 4. Store & alert: Clean invoices are appended to the Invoices tab, with line items on the Line Items tab, and the email is labeled Processed. Invoices for review get the Needs Review label and an alert email. Logged invoices also trigger an alert if the total is over your limit or the due date is close or past. ### Setup 1. Connect your PDF.co, Gmail and Google Sheets accounts. 2. In Gmail, create three labels: Invoices, Processed and Needs Review. Select Processed and Needs Review in the two Mark email… nodes. 3. Create a Google Sheet with two tabs: - Invoices: Invoice Number, Vendor, Invoice Date, Due Date, Subtotal, Tax, Total, PO Number, Line Items, Alerts, From, Email Subject, Received At, Source File, Email Link, Logged At - Line Items: Invoice Number, Vendor, Line, Description, Quantity, Unit Price, Amount 4. Open Config and set the sheet URL, alert email, alert amount, due-soon window and split text. 5. Activate the workflow and send yourself a test invoice. ### Customization - Leave splitSearchText empty to treat every PDF as one invoice. This also saves PDF.co credits. - Add fields such as purchaseOrderRef in the parser's Custom Fields, then map them in Validate invoice. - Swap the alert email for Slack or Teams, or the Sheets nodes for your ERP.

The steps

  1. Watch invoice emails
  2. Config
  3. Download email and attachments
  4. One item per PDF
  5. Loop over PDFs
  6. Upload PDF to PDF.co
  7. Attach upload URL
  8. Split enabled?
  9. Split into single invoices
  10. List invoices
  11. Loop over invoices
  12. Parse invoice with AI
  13. Attach parse result
  14. Read logged invoices

24 steps in total.

Similar automations