Skip to content
TriedPrompts

More in Bookkeeping, receipts & invoices.

Auto-file inbox invoices to Drive and Sheets with Gemini and Apps Script

WorkedEvidence: Described by posterPosted Last checked

Silvia Carasel used Gemini plus Apps Script to save Gmail invoices to Drive, log Sheets rows and email a report on the 20th.

How to use this

  1. Tap Copy prompt.
  2. Open Gemini.
  3. Paste it into the message box.
  4. Send it, then read the answer before acting on it.
New to this? What's a prompt?

A prompt is the message you send to the AI tool. Copy the one on this page, put your own details where it asks, and read the answer before you act on it.

Prompt

Recreated prompt

The source didn't share its exact prompt, so we wrote one from what it describes. The result shown is the source's, not ours.

What the prompt labels mean

The person didn't share their exact words, so we wrote this from what they described. We haven't tested it, and they didn't use this exact version.

Build a daily Google Apps Script that reads invoice emails from Gmail, saves PDFs to Drive with clean names, logs amount and vendor to a Sheet, and archives the messages. Use regex for simple senders and Gemini when the amount is buried in a PDF. On the 20th of each month, email me the full report.

Try this in:

Sends the Recreated prompt shown above. ChatGPT and Grok open with it filled in, and ChatGPT may send it straight away. Gemini and Claude open empty, so we copy the prompt for you to paste. Every button also copies it.

Opens in a new tab. We don't see what you send.

These links are only a shortcut. We're not affiliated with OpenAI, Google, Anthropic or xAI, and your results may not match the source.

Optional stronger version

Our rewrite with extra checks. The poster didn't test it.

Before you start, ask me 1–3 short questions about the details below and wait for my answers. Once I've answered, confirm the plan in one line and run the whole task start to finish.

Goal: Automate invoice intake from Gmail into Drive and Sheets without a paid ops stack.

Questions to ask me first:
- Which senders are regex-simple vs PDF-hard?
- What Drive folder naming scheme do you want?
- Which Sheet columns and monthly report email should be used?

Inputs (fill in or confirm):
- Gmail labels/senders: [LIST]
- Drive folder: [PATH]
- Sheet schema: [COLUMNS]
- Report email day: [DAY]

Rules:
- Match each sender to regex or Gemini on purpose.
- Never skip human review for unfamiliar senders at first.
- Archive only after a successful log row.
- Keep the Gemini path on the free tier unless I say otherwise.

Checkpoint: Process three sample senders and show the Sheet rows before enabling daily runs.

If you get stuck: If a portal email has no PDF, flag it for manual download instead of inventing an amount.

Verify before you finish: Reconcile the Sheet total to the saved PDFs for one week.

Output: Apps Script outline, sender strategy table and a sample monthly report format.

Done when: Invoices file themselves daily and I get a month-end report.

AI tool

Gemini

Outcome

Silvia Carasel was losing mornings to invoices that arrived in different formats: amounts buried in PDFs, one address used for two invoice types, and portals with no attachment. Using Google Apps Script with Gmail, Drive, Sheets and the Gemini API on the free tier, Carasel mapped each sender to a strategy—regex when that was enough, Gemini when the amount lived in a PDF—then saved cleanly named files to Drive, logged rows to a spreadsheet, archived the emails and emailed a full report on the 20th of each month. The job that used to be a redundant manual process now runs automatically each day.

Evidence: Described by posterThe person describes what happened in words, without screenshots or video.

Source

Posted
by Silvia Carasel
Last checked
Method:
How we verify

https://silviacarasel.beehiiv.com/p/i-automated-the-2-things-eating-my-mornings

Context: Same post also covers an inbox triage agent; this case is only the invoice automation. Self-reported.

More in Bookkeeping, receipts & invoices