Gmail invoice PDFs to Sheets with GPT

Gmail invoice PDFs parsed by OpenAI into Sheets. This n8n template checks Gmail every minute for new invoice attachments, keeps only emails with PDF attachments and converts each PDF to text. An OpenAI model, GPT-4 in the body text and GPT-4o in the title, processes that text with specialized prompts into 25 or more standardized invoice fields. The workflow then generates a new Google Sheets document with timestamp naming for each invoice and moves it to designated Google Drive folders. It works with text-based PDFs, not scanned images; the page names accounting firms, bookkeepers and small and medium businesses as users.

n8nRead on 2026-11-168 steps

Steps

  1. Trigger: Intelligent email monitoringGmail
  2. Attachment verificationGmail
  3. Advanced PDF extraction
  4. AI-Powered data analysisOpenAI
  5. Structured data formatting
  6. Dynamic spreadsheet creationGoogle Sheets
  7. Output: Automated file organizationGoogle Drive
  8. Output: Data populationGoogle Sheets

Limits

  • Works only with text-based PDF invoices, not scanned images.

What it does well

  • Produces 25+ standardized fields for invoice tracking.

Before you import

Import the workflow JSON into your n8n instance.

Similar templates