AI TOOLS KITaitoolskit.dev

GOOGLE DRIVE RECEIPT READER

Upload a receipt.
Get a row in Sheets.

Enter your folder, your sheet and your Gemini key, then copy one script.
Upload receipt photos on a simple page, or drop them in a Drive folder and let it read them for you.

JPG and PNG receiptsYour own Gemini keyCode built in your browser

Before you start

You must own the folder and the sheet, or be allowed to read the folder and edit the sheet.

Install and test

  1. Open your results sheet, choose Extensions → Apps Script, paste Code.gs and save.
  2. Choose processReceipts and press Run. Allow the permissions Google asks for. If the folder is empty it will say "No new receipt images", which is fine.

Option A — Upload page (easiest)

  1. In Apps Script choose Deploy → New deployment. Click the gear and pick Web app.
  2. Set Execute as: Me and Who has access: Only myself. Do not choose Anyone, because anyone with the link could use your Gemini key. Then click Deploy and allow the permissions.
  3. Open the Web app URL, choose one or more receipt photos and press Read receipts. Each result appears in the table and as a new row in the Receipts tab.
  4. If you change the code later, save it and choose Deploy → Manage deployments → Edit → New version → Deploy.

Option B — Automatic folder watcher

  1. Upload a sample receipt to your Drive folder, run processReceipts and check the first row in the Receipts tab.
  2. Choose installTrigger and press Run once. The script now checks the folder every minute and reads each new photo.
  3. Upload a new receipt, wait a few minutes and check for the new row. Share only the receipt folder with other people, never the sheet or the script.
  4. When you are done, run removeTrigger to stop the automation.

Both options use the same sheet and never read the same file twice. Each folder run reads at most 3 new files. Rows marked "Needs review" are missing at least one value, so compare them with the original image. Always check the results against the original receipt.