// free agents / invoice-logger

🧾 Invoice & receipt logger

“Log every invoice and receipt I get by email into a spreadsheet: date, vendor, amount.”

Free, no sign-up. MIT licence. Python standard library only, so there's nothing to pip install.

What it does

Finds invoice and receipt emails over IMAP, reads the email text and any text-based PDF attached, and adds one row per invoice to a CSV file (opens in Excel, Numbers or Google Sheets): date, vendor, amount, currency, invoice number. Optionally it also adds the row to a Google Sheet. Already-logged emails are skipped.

What you need

5-minute setup

Python

  1. Install Python 3.9+ and unzip the download.
  2. Try it with no accounts: python3 invoice_logger.py --eml-dir sample_emails --dry-run
  3. Copy .env.example to .env and fill it in.
  4. Run: set -a; . ./.env; set +a; python3 invoice_logger.py (Windows steps in the README).

n8n (no code)

  1. Workflows, then Import from file, then invoice-logger.n8n.json.
  2. Follow the yellow “Read me” note (credentials or webhook).
  3. Test workflow, then switch it to Active.

Run it on a schedule

Every day at 07:00 with cron:

0 7 * * * cd /path/to/invoice-logger && set -a && . ./.env && set +a && python3 invoice_logger.py >> run.log 2>&1

On Windows use Task Scheduler. With n8n, the Schedule node does it for you.

Settings

VariableWhat it does
IMAP_HOST / IMAP_USER / IMAP_PASSWORDYour mailbox
DAYSHow far back to look, default 30
KEYWORDSSubject/file words that mean 'invoice', default invoice,receipt,facture,rechnung,order confirmation...
FROM_CONTAINSOptional: only these senders, e.g. stripe,aws,billing@
CSV_FILEDefault ./invoices.csv
SHEET_WEBHOOK_URLOptional: your Apps Script web app URL (see google_sheet_webhook.gs)

What we tested

Honest limits

Related guides

Want one built for your task?

Describe it in one sentence. We build it, test it and email it to you, usually within 24h. Free while we're in beta.

We'll only email you about your agent and TaskToAgent.