Downloads
Download the n8n workflow (JSON)
ai-invoice-reader-n8n.json · n8n workflow · 11 steps · starts with New invoice email · uses Gmail, Anthropic, Google Sheets, Google Drive, Slack · 13 KB
Import into n8n: Create Workflow, then the menu, then Import from File.
How to import it into n8n
- In n8n, create a new workflow.
- Open the ⋯ menu at the top right and choose Import from File, then pick the downloaded .json. (Or open the file, copy everything and paste it on the canvas.)
- Open each node with a warning and connect your own account: the file carries no passwords or keys.
- Run it once with Test workflow, check the result, then switch it to Active.
What this workflow does
Every invoice PDF that lands in Gmail is read by Claude. It pulls out the vendor, invoice number, dates, line items, GST, total and GSTIN, checks the maths, then adds a row to Google Sheets and files the PDF in Google Drive. If something doesn't add up, you get a Slack message instead of a wrong row. Every morning at 9 AM it also tells you which invoices are due in the next 7 days.
What you need
- An n8n account (n8n Cloud or self-hosted)
- An Anthropic API key for Claude
- Gmail, Google Sheets and Google Drive
- Slack (for alerts and reminders)
Step 1: Import the workflow
- Download the JSON file below.
- In n8n, click Create Workflow, open the ⋯ menu and choose Import from File.
- You will see two flows: New invoice email → Claude: read invoice → Check the maths → All checks passed?, and a second one starting at Every day 9 AM.
Step 2: Watch Gmail for invoices
Open New invoice email and connect Gmail. It looks for unread emails with a PDF attachment and the label Invoices. Create that label and a Gmail filter for your vendors, or change the search to something like has:attachment filename:pdf subject:invoice.
Step 3: Send the PDF to Claude
Open Claude: read invoice and connect your Anthropic key. The prompt asks for clean JSON only and says "never guess a number", so missing fields come back as null instead of made-up values.
Step 4: Check the maths
Check the maths adds up the line items plus GST and compares it with the total. It also flags a missing total, a GSTIN that isn't 15 characters, and a due date before the invoice date. Nothing is saved until the checks pass.
Step 5: Save to Sheets and Drive
Create a sheet with a tab called Invoices and the columns Received, Vendor, Invoice no, Date, Due date, GST, Total, GSTIN, Status. Paste its URL into Add to sheet and Read invoices. In Save PDF to Drive, connect Drive and paste the ID of your invoices folder.
Step 6: Alerts that matter
Connect Slack on Needs review and Payment reminder and pick a channel. Mark an invoice as paid by typing paid in its Status cell, and it drops out of the reminders. Email yourself a test invoice, check the row and the PDF, then flip the switch to Active.
Troubleshooting
- Nothing happens: the email must be unread, have a PDF attached and match the search.
- "Could not read the invoice": scanned photos work, but very blurry ones don't. Ask the vendor for the original PDF.
- Totals off by a rupee: the check allows a ₹1 rounding difference. Change the
> 1in Check the maths if you need it stricter.
Want the members-only resources too?
A free account unlocks them all, including the ones shared in DMs.

