You do not need a budgeting app to see where money goes; you need the numbers in one place. Receipts already arrive by email, so this bot copies them into a sheet you can sort, filter and sum.
Make the sheet
Create a new Google Sheet called Receipts with the headers Date, From, Subject and Amount in the first row.
Open the script editor from the sheet
In the sheet, open Extensions → Apps Script. A script attached to this sheet opens in a new tab.
Paste the script
Replace the editor's contents with this:
function logReceipts() { const sheet = SpreadsheetApp.getActiveSpreadsheet().getSheets()[0]; const label = GmailApp.getUserLabelByName('logged') || GmailApp.createLabel('logged'); const threads = GmailApp.search('subject:(receipt OR order OR invoice) -label:logged newer_than:2d'); for (const thread of threads) { const m = thread.getMessages()[0]; const amount = (m.getPlainBody().match(/[$€£]\s?\d+[.,]\d{2}/) || [''])[0]; sheet.appendRow([m.getDate(), m.getFrom(), m.getSubject(), amount]); thread.addLabel(label); } }Run it and allow access
Click Run, allow access, and check that recent receipts appear as rows.
Schedule it for each evening
Open Triggers, add a trigger for
logReceipts, Time-driven, Day timer, 9 pm to 10 pm.
Paste this into Claude Code, Codex or any coding agent. The agent writes and sets up the automation, then tells you what to click.
Write a Google Apps Script bound to a Google Sheet that logs my receipt emails. - Find receipt, order-confirmation and invoice emails from the last 2 days that don't carry the Gmail label "logged"; create the label if needed and add it after logging. - For each one, append a row: date, shop name (not the raw sender address), subject, total amount and currency. Prefer the line labelled total over the first price in the email. - Leave the amount blank rather than guessing when no total is found. - Add a daily trigger for 9-10 pm and explain how to set it up from the sheet's Extensions menu.
You still need to
- Sign in to Google and click Allow when the script first runs.
- Check the first week of rows and tell the agent which shops it misread.
Things that trip people up
- The by-hand version grabs the first price it sees, which is sometimes a single item instead of the total. Check the first few days.
- Receipts from shops that send images instead of text won't have an amount.