Invoice Attachment Collector: every emailed invoice filed in Drive and logged in a sheet, hands-free
An n8n workflow that catches invoice and receipt emails, uploads the PDF attachments to a tidy Google Drive folder, has Claude pull the vendor, amount, and due date from the email, and appends one row per invoice to your bookkeeping sheet.
- 1
Catch invoice emails with attachments
Add a
Gmail Triggernode polling every 15 minutes with the filterhas:attachment subject:(invoice OR receipt OR bill)and attachment download enabled. Most missed invoices die in the inbox — this net catches them the moment they land. - 2
Keep only the PDFs
Add a
Codenode that walks the email's binary attachments and keeps only files ending in.pdf, renaming each toYYYY-MM-DD_sender_filename.pdfso the Drive folder sorts itself chronologically. - 3
Upload to the invoices folder in Drive
Add a
Google Driveupload node pointed at a dedicatedInvoices/folder. One folder, consistent names, nothing lost — when tax season comes you share a single folder link with your accountant. - 4
Let Claude extract the bookkeeping fields
Add an
HTTP Requestnode to the Claude API (/v1/messages). Pass the email subject, sender, and body text. Prompt: extractvendor,invoice_number,amount,currency,due_date(ISO format) — JSON only,nullfor anything not stated. The email body almost always repeats the key numbers, so you get clean data without any PDF parsing. - 5
Build the row and append to the bookkeeping sheet
Add a small
Codenode that parses Claude's JSON and merges in the Drive file link, then aGoogle Sheetsappend node: received date, vendor, invoice number, amount, currency, due date, Drive link, and apaidcolumn. Sort by due date once a week and you'll never eat a late-payment fee again.
Frequently asked questions
What does this cost to run?
Gmail, Drive, and Sheets are free; Claude extraction costs a fraction of a cent per invoice. A business receiving 100 invoices a month spends well under $1 — self-host n8n and that's the whole bill.
It reads the email body — what about data locked inside the PDF?
Invoice emails almost always repeat the key numbers (amount, due date, invoice number) in the body, which is why this recipe skips PDF parsing entirely. If a vendor sends bare PDFs with empty emails, add n8n's Extract From File node before the Claude step and pass the extracted text instead.
Can it work with Make instead of n8n?
Yes — Make's Gmail watch-emails module (with attachment download), a filter, Google Drive upload, an HTTP call to Claude, and Google Sheets map one-to-one to the five steps. The importable JSON file is n8n-only, so on Make you rebuild from the steps.