Finance & Back Office · n8n

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.

difficulty Beginnersetup 35 minresult A Drive folder and a sheet your accountant will actually thank you for✓ Tested · July 4, 2026
  1. 1

    Catch invoice emails with attachments

    Add a Gmail Trigger node polling every 15 minutes with the filter has: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. 2

    Keep only the PDFs

    Add a Code node that walks the email's binary attachments and keeps only files ending in .pdf, renaming each to YYYY-MM-DD_sender_filename.pdf so the Drive folder sorts itself chronologically.

  3. 3

    Upload to the invoices folder in Drive

    Add a Google Drive upload node pointed at a dedicated Invoices/ folder. One folder, consistent names, nothing lost — when tax season comes you share a single folder link with your accountant.

  4. 4

    Let Claude extract the bookkeeping fields

    Add an HTTP Request node to the Claude API (/v1/messages). Pass the email subject, sender, and body text. Prompt: extract vendor, invoice_number, amount, currency, due_date (ISO format) — JSON only, null for anything not stated. The email body almost always repeats the key numbers, so you get clean data without any PDF parsing.

  5. 5

    Build the row and append to the bookkeeping sheet

    Add a small Code node that parses Claude's JSON and merges in the Drive file link, then a Google Sheets append node: received date, vendor, invoice number, amount, currency, due date, Drive link, and a paid column. 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.

About this recipe. Recipes on FlowRecipesHub are written for business owners, not developers, and are tested before publishing — how recipes get made. Some ingredient links are affiliate links that cost you nothing — full disclosure.