I built a workflow that scans receipts and auto-sorts them for taxes — deductibles go to a separate tracker automatically

Tax season I had a shoebox of receipts and no idea which ones actually mattered. Spent a weekend sorting through them manually. Built this so I never have to do that again.

What it does

Watches a Google Drive folder for new receipts, extracts everything, figures out if it’s a business expense, and splits deductibles into a separate tax tracker automatically. Takes about 7 seconds per receipt.

Here’s what gets extracted:

  • Store name, address, and receipt date
  • Every line item with quantity and price
  • Subtotal, tax amount, tax rate, and total
  • Payment method and last four digits
  • Whether it’s tax-deductible (yes/no)
  • Category: Office Supplies, Business Meals, Travel, Equipment, Software, Professional Services, or Marketing

Two sheets get updated: a full Receipt Database for everything, and a Tax Deductions sheet that only catches the deductibles. Each receipt gets a unique ID (like RCP-A4BX2) and is tagged with tax year and quarter automatically.

How it works

Drop receipt in Drive folder → AI extracts data → generates receipt ID + tax quarter → logs to Receipt Database → checks if deductible → routes to Tax Deductions sheet if yes

The routing is the useful part. Non-deductible receipts (groceries, personal stuff) just go to the main log. Business expenses automatically land in the tax tracker too, already categorized.

What I’ve tested it with

Been running this for a couple months with:

  • Printed store receipts (Staples, Home Depot, Amazon)
  • Restaurant receipts for client meals
  • Software subscription confirmations (PDFs from Stripe, etc.)
  • Phone photos of crumpled paper receipts
  • Scanned documents

Accuracy on digital PDFs is around 97%. Scanned/photographed receipts drop to about 90% — works fine but messier merchant descriptions sometimes get miscategorized. If a receipt is blurry or handwritten it’ll still try, just less reliable on the line items.

Tax deductibility detection is roughly 85-90% accurate in my experience. It’s making a judgment call based on merchant type and category — a coffee shop receipt might get flagged as Business Meals even if it was personal. Worth spot-checking quarterly.

Setup

About 15 minutes. You’ll need:

  • Google Drive and Sheets (free)
  • n8n instance (self-hosted or cloud)
  • PDF Vector account (free tier: 100 credits/month, ~30 receipts)
  • Slack is not required — this workflow doesn’t include it, just logs to Sheets

Download

Workflow JSON: github.com/khanhduyvt0101/workflows

Full workflow collection: khanhduyvt0101/workflows — PDF automation workflows ready to import


Setup Guide

Step 1: Get your PDF Vector API key

Sign up at https://www.pdfvector.com — free plan works fine. Go to API Keys and generate a new key.

Step 2: Create your Google Drive folder

Create a folder called “Receipts” in Google Drive. Copy the folder ID from the URL (the string after /folders/).

Step 3: Set up your Google Sheet

Create a new spreadsheet with two tabs:

Tab 1 — Receipt Database:

Receipt ID | Date | Store | Items | Subtotal | Tax | Total | Payment | Tax Deductible | Category | Tax Year | Quarter

Tab 2 — Tax Deductions:

Receipt ID | Date | Vendor | Amount | Category | Tax Year | Quarter

Copy the Sheet ID from the URL (the long string between /d/ and /edit).

Step 4: Import the workflow

Download the JSON from GitHub and import it into n8n via Import from File.

Step 5: Configure the nodes

Google Drive Trigger:

  • Connect your Google account
  • Set the folder to your “Receipts” folder ID

Download file:

  • Use the same Google credential

PDF Vector - Extract Receipt:

  • Add new credential (Bearer Token type)
  • Paste your API key from Step 1

Log to Receipt Database:

  • Connect your Google account
  • Paste your Sheet ID
  • Make sure the sheet tab is named exactly “Receipt Database”

Tax Deductible? (IF node):

  • No config needed — routes automatically based on the isTaxDeductible field

Add to Tax Deductions:

  • Same Google credential and Sheet ID
  • Tab must be named exactly “Tax Deductions”

Step 6: Test it

Activate the workflow and drop a receipt PDF into your Drive folder. Wait about a minute and check both sheets. If it’s a business receipt it should appear in both; personal receipts only land in Receipt Database.


What gets extracted

Header: Store name, address, date

Line items: Each item with name, quantity, and price

Totals: Subtotal, tax amount, tax rate, final total

Payment: Method (credit/debit/cash) and last four digits if visible

Tax fields: isTaxDeductible (true/false) and deductionCategory from a fixed list of 8 categories

Tax categories

The workflow assigns one of these:

  • Office Supplies
  • Business Meals
  • Travel
  • Equipment
  • Software
  • Professional Services
  • Marketing
  • Not Deductible

You can customize the list by editing the schema in the PDF Vector node.


Cost

Free tier is 100 credits/month. Each receipt uses about 3-4 credits depending on how many line items. So you get roughly 25-30 receipts per month for free.

Basic plan is $25/month for 3,000 credits if you’re doing volume.


Customizing it

Add more tax categories: Edit the deductionCategory enum in the PDF Vector node schema. Add things like "Rent", "Utilities", or "Education" to match your situation.

Change the deductibility logic: The AI is making the deductible call. If you want stricter control, add a Code node after extraction that overrides isTaxDeductible based on your own rules — for example, always flag any merchant in a list of known vendors as deductible.

Add Slack notifications: Drop a Slack node at the end of either (or both) paths from the IF node. Useful if you want a ping every time a deductible receipt gets logged.

Email trigger instead of Drive: Swap the Google Drive Trigger for a Gmail Trigger to catch receipts that come in as email attachments. Everything downstream stays the same.

Track mileage or other non-receipt expenses: Add a separate sheet tab and a manual trigger workflow for expenses that don’t have receipts. Link them using the same Tax Year and Quarter fields.


Troubleshooting

Workflow doesn’t trigger: Make sure the Active toggle is on and the folder ID is correct. Open Executions to see if it ran and errored somewhere.

Items list shows “Items not itemized”: The receipt probably didn’t have individual line items visible — common with some restaurant receipts. The total still gets captured correctly.

Wrong category assigned: Edit the prompt in the PDF Vector node to add more context. For example: “This is for a US freelancer — software subscriptions are always deductible under the Software category.”

Tax Deductions sheet not updating: Check the IF node is routing correctly. Execute the workflow manually with a known business receipt and look at the IF node output to see which path it took.

Sheet columns don’t match: Column names are case-sensitive. Make sure your headers match exactly, including spaces.


Limitations

  • Tax deductibility is an AI judgment call — not accounting advice, always verify with your accountant
  • Doesn’t handle split expenses (half personal, half business)
  • Cash receipts with no date printed will have a blank date field
  • Doesn’t summarize totals by category — you’d need a pivot table in Sheets for that

Links


Questions? Drop a comment if something’s not working or you want to set it up differently.