Invoice Parser Agent — Upload a PDF invoice — structured rows in Sheets and a summary email out.

Invoice Parser Agent

Upload a PDF invoice — structured rows in Sheets and a summary email out.

n8nOpenAIGoogle SheetsGmailPDF extraction

Overview

A form-triggered n8n workflow that accepts invoice PDFs, extracts text, uses OpenAI information extraction with a strict JSON schema, splits line items into Google Sheets rows, and emails a parsed summary to finance.

Problem

Finance teams re-type invoice numbers, vendors, totals, and line items by hand. PDF layouts differ and manual entry slows month-end close.

Solution

Built a public form upload path, PDF text extraction, schema-locked OpenAI extractor for header fields and line_items array, Google Sheets append per line, aggregation for totals, and Gmail notification with the parsed result.

Architecture

n8n form trigger, Extract from File for PDF text, LangChain Information Extractor with manual JSON schema, Split Out for line items, Google Sheets append mapping, Aggregate node, Gmail send for confirmation.

Workflow

  1. 01 User submits invoice PDF via n8n form
  2. 02 Extract text from the document
  3. 03 OpenAI returns structured invoice JSON
  4. 04 Each line item appended to Google Sheets
  5. 05 Summary email sent to finance contact

Results

  • · Invoice headers and line items captured without retyping
  • · Consistent schema across varied PDF layouts
  • · Sheet becomes the live invoice register
  • · Email confirms what was parsed and stored

Want something similar?

Let's talk about your project.

Start a project