Library / Finance, Invoices & Accounting
Finance, Invoices & Accounting
Create numbered PDF invoices from Gmail with Claude, MintPDF and Google Sheets
Runs on new Gmail invoice requests, extracts order details with Claude, issues the next invoice number as a MintPDF file, replies to the customer, and logs it in Sheets.
What it does
## Turn invoice request emails into numbered PDF invoices Customers email you asking for an invoice or placing an order. This workflow reads each email with AI, checks the numbers, gives it the next invoice number, renders a PDF with MintPDF, replies to the customer with the PDF, archives it in Google Drive and logs it in Google Sheets. Anything unclear goes to a review tab instead of the customer. ### How it works 1. New invoice request email polls Gmail for request emails. 2. Extract customer and line items uses Claude to pull out the customer, items, prices and PO number as structured data. 3. Validate items and total in cents checks every field and totals in integer cents. Bad data, a foreign currency or a total above your approval limit goes to Log request for review and you get an email. 4. Number invoice and build HTML reads the Sheets log, assigns the next number (INV-2026-0001), skips emails already invoiced and builds escaped invoice HTML. 5. Render invoice PDF (MintPDF) makes an A4 PDF. The PDF is archived in Drive, sent as a reply in the same Gmail thread and logged. ### Setup 1. Install the verified community node n8n-nodes-mintpdf and add a MintPDF API credential (free key at mintpdf.dev). 2. Connect Gmail, Google Sheets, Google Drive and Anthropic credentials. 3. Make a sheet with two tabs, Invoices and Review, with the headers listed in their nodes. 4. Fill in Invoice settings, then activate. ### Customization tips - Change the invoice design in the block of Number invoice and build HTML. - Swap Claude for OpenAI or Gemini by changing the chat model.
The steps
- New invoice request email
- Invoice settings
- Extract customer and line items
- Claude chat model
- Validate items and total in cents
- Valid invoice request?
- Log request for review
- Email owner to review
- Read invoice log
- Number invoice and build HTML
- Already invoiced?
- Skip duplicate request
- Render invoice PDF
- PDF rendered?
19 steps in total.
Similar automations
Files & Cloud StorageSend weekly sales PDF reports from Google Sheets to Slack with Claude and MintPDF14 stepsDocuments, PDF & OCRConvert Markdown into a branded PDF with table of contents using PDFMint11 stepsFiles & Cloud StorageSave, extract, and log email invoices with Gmail, Drive, Sheets, Claude, and PDF.co29 stepsFinance, Invoices & AccountingSync OVH Invoices to Sheets and Drive13 steps