AI invoice workflow extracts PDF data into Google Sheets

Built an n8n workflow that uploads invoice PDFs to Drive, extracts fields with OpenAI, and logs rows to Google Sheets.

Used for
Work
Skill needed
Low code
Shown in video
Partial demo
Summary based on
Transcript
Hello Shishir | Work Smarter with AIWatch on YouTube

How I Built an AI Invoice Agent to Process 100s of PDFs

Published Nov 11, 202611:13581 views10 likes

Key moments

  • 3:27OpenAI extraction node configured
  • 9:44Five invoices stored and logged successfully

What they made

Five uploaded invoice PDFs were saved to Google Drive and their extracted fields logged to Google Sheets.

9:44

How they did it

  1. Human0:48

    Uploads five sample invoice PDFs through an n8n form trigger.

    Stated in video · n8n
  2. AI1:20

    Split-out node separates the five binary files into individual items.

    Stated in video · n8n
  3. AI2:40

    Uploads each file to Google Drive using JavaScript expressions for filename.

    Stated in video · Google Drive
  4. AI3:27

    OpenAI reads each invoice PDF and extracts fields per a detailed prompt and JSON schema.

    Stated in video · OpenAI
  5. AI7:54

    Field-mapping node formats extracted data into rows for Google Sheets.

    Stated in video · n8n
  6. AI8:41

    Appends each formatted row to a Google Sheets document.

    Stated in video · Google Sheets

What you can reuse

  • Loop and split nodes let one workflow process multiple invoice PDFs individually.
  • A strict JSON schema plus zero temperature keeps extraction consistent for financial data.
  • Gemini may outperform OpenAI on image-based PDFs.

Trade-offs

  • Demo uses sample invoices, not the creator's real production invoices.
  • No accuracy metrics reported for extraction.
  • Due-date reminders are not yet implemented.

AI-generated case summaries can contain mistakes. Report an error

Related cases