Log invoices from any mailbox to Google Sheets

Every 4 hours, pull new invoices and receipts from your inbox, extract vendor and totals, and log a clean row in Google Sheets. Works with Gmail, Outlook, Exchange, iCloud, and IMAP.

Agentic Task
AurinkoGoogle SheetsFinanceOperationsDocument ProcessingData Sync
PromptCreate

Build me a bookkeeping helper that turns invoice and receipt emails into rows in a Google Sheet.

Trigger: cron, every 4 hours.

On each run, do this:

1. Call Aurinko List Email Messages to find recent messages from roughly the last 6 hours that look like invoices or receipts. Use search terms like "invoice", "receipt", "order confirmation", "payment", plus any known vendor domains I've configured. Aurinko is a single connection that works for Gmail, Outlook, Office 365, Exchange, iCloud, and IMAP, so this workflow does not depend on the underlying provider.

2. For each candidate message, call Aurinko Get Email Message to pull the full body and any attachment metadata.

3. Extract structured fields from the message body and, when available, the content of any PDF or image attachment. The fields I need are: vendor name, invoice number, invoice date, currency, subtotal, tax, total, payment method, and a short one-line description of what was purchased.

4. Skip anything that is clearly a marketing email, newsletter, shipping notification, or an unpaid quote. Only real paid invoices and confirmed receipts should proceed.

5. Deduplicate on invoice number plus vendor. Before writing a row, check whether the same vendor and invoice number are already in the sheet and skip if so, so re-runs never double-book the same receipt.

6. For every extracted invoice, call Google Sheets Append Values on my designated Expenses tab, writing one row per invoice with these columns: vendor name, invoice number, invoice date, currency, subtotal, tax, total, payment method, one-line description, source email subject, and source email message id so a human can click back to the original.

At the end of each run, print a short summary: how many candidate messages were found, how many invoices were extracted, how many rows were appended, and how many were skipped as duplicates or non-invoices.

Integrations: aurinko, google-sheets.

Additional information

What does this prompt do?
  • Checks your mailbox every 4 hours for fresh invoices, receipts, order confirmations, and payment notifications from the last few hours.
  • Reads the email body and any attached PDFs or images and pulls out vendor, invoice number, date, currency, subtotal, tax, total, payment method, and a one-line description of what was bought.
  • Appends a tidy row to your Expenses tab in Google Sheets with the source subject line and a link back to the original email, so you can always click through to verify.
  • Ignores marketing blasts, unpaid quotes, and shipping updates so your ledger stays clean.
  • Deduplicates on vendor and invoice number, so re-running the workflow never double-books the same receipt.
What do I need to use this?
  • An Aurinko account connected to the mailbox you want to scan. Aurinko covers Gmail, Outlook, Office 365, Exchange, iCloud, and IMAP behind a single connection.
  • A Google Sheets spreadsheet with an Expenses tab where new rows will be appended.
  • A rough list of vendor domains you buy from (optional, but sharpens the results).
How can I customize it?
  • Change how often it runs. Every 4 hours is the default, but hourly, daily, or twice a day all work.
  • Tune the search terms and vendor domains it looks for so it catches your actual receipts and skips your actual junk.
  • Adjust the columns it writes so the sheet matches how you already do your books, for example adding a category or a project tag.

Frequently asked questions

Does this only work with Gmail?
No. Aurinko is a single connection that covers Gmail, Outlook, Office 365, Exchange, iCloud, and standard IMAP mailboxes, so this workflow runs against whichever inbox you connect.
Will it create duplicate rows if it runs on the same invoice twice?
No. Before writing a row, it checks the Expenses tab for the same vendor and invoice number and skips anything that is already logged.
What about marketing emails or unpaid quotes that mention prices?
The agent reads the message and skips anything that is clearly a promotion, newsletter, or an unpaid quote. Only actual invoices and paid receipts get a row.
Can it read the PDF or image attached to the email?
Yes. When an invoice or receipt arrives as a PDF or image, the agent extracts the vendor, totals, and dates from the attachment instead of guessing from the email body.
How do I click back to the original email from the spreadsheet?
Each row includes the original email subject and message reference, so you can search your inbox for it in one click if you ever need to double check a line.

Stop hand-copying receipts into your bookkeeping sheet.

Connect your mailbox and Google Sheets once, and Geni logs every invoice every 4 hours.