The AgentivUse cases

Finance · An afternoon

Subcontractor bills filed before you open them

A script a contractor built with ChatGPT in an afternoon that collects every subcontractor invoice from his email, reads it, works out which job it belongs to and files it in the right Google Drive job folder; you keep the bookkeeping entry yourself

The problem

A builder with dozens of jobs running gets several subcontractor invoices by email every day. Each one means opening the file, working out which project it belongs to, typing the subcontractor, invoice number, amount and payment details into the books and dropping the document into the right job folder, and a misfiled invoice turns up months later as a dispute.

Architecture

  1. Channel
    • Invoices arriving by email
  2. Agent
    • Script written with ChatGPT
    • Reads invoice, matches the job
  3. Tools
    • Your email account
    • Google Drive job folders
    • Zoho Books
  4. Human
    • Owner books and approves payment

Where the data stays: Invoices stay in your email and your Google Drive; the script runs in your own accounts, and only sample invoices with details blanked go into the chat while you build it.

Design flow

  1. A subcontractor invoice lands in the inbox
  2. Script collects it into one Drive folder and reads it
  3. Matched to one of about 30 job folders
  4. No confident match: left in Unmatched for youOnly sometimes
  5. Owner opens the filed invoice, books it and approves paymentHuman checkpoint

Setup

Total time: 3 h 20 min our estimate

  1. 20 min

    Done when: One list holds every active job with its exact Drive folder name, site address and the subcontractors working on it; the script matches against this list.

  2. 2 h

    The source does not say which scripting platform the builder used; ask ChatGPT for the simplest one that fits your email provider. OpenAI's operations guide suggests Codex when the work is building an internal workflow tool like this.

    Done when: Using the prompt above, ChatGPT has walked you through connecting a script to your email and Drive, and a test invoice moves from the inbox into the right job folder.

  3. 45 min

    Done when: Every invoice from last week landed in the folder you would have chosen, and the ones the script was unsure about sit in Unmatched rather than in a wrong job.

  4. 15 min

    Done when: Your routine is set: each day you open the newly filed invoices, post them in Zoho Books and approve payment, and a misfiled one gets moved and the job list corrected.

Ticks are saved on this browser.

Download the kit (zip)

Starter prompt

Written from how the use case works and its sources. Replace the parts in square brackets.

I run a [construction] business and get several subcontractor invoices by email every day. Help me build a script that connects to my [Gmail] account, collects every email attachment that is an invoice into one folder in my [Google Drive], reads each invoice, works out which job it belongs to from my list of about [30] active jobs (names and addresses below) and moves it into that job's folder. If it cannot match a job with confidence, it leaves the file in a folder called Unmatched for me. Walk me through it step by step: what to set up first, what to copy where, how to test it on five old invoices, and how to run it every [hour]. I will still post every invoice in my accounting software myself. My job list: [job name, site address, subcontractors on it].

Risks and data

Data

The script reads your inbox and writes to your Drive, so it runs under your own account with the narrowest access that works, and the chat where you build it only ever sees sample invoices with bank details blanked. Invoices from sole traders are personal data: keep the job folders restricted.

How it goes wrong

It goes wrong when two jobs share a subcontractor and a similar address, so an invoice is filed under the wrong one and paid against the wrong budget, or when a renamed folder breaks the matching silently. You notice at the booking step, or when a job's costs look too high. Keep the Unmatched folder for anything uncertain, check it daily, and update the job list the day a job opens or closes.

Data protection. This use case touches personal data, so check the rules where you operate (for example GDPR, PDPA). Supplier invoices carry bank account details and sometimes a sole trader's personal data. Keep the script inside your own email and Drive accounts, do not paste invoice contents into the chat while building it (use a sample with the details blanked), and restrict the job folders to the people who pay invoices.

How the agent works

  1. It starts

    The owner describes the job to ChatGPT and, with its help, builds a script connected to his email account.

  2. The agent works

    The script puts every incoming invoice in one folder, reads it, identifies which job it belongs to and moves the document into that job's folder in Google Drive, where about 30 active jobs each have their own. The first version took about two hours to build. The booking step stays with you: open the filed invoices, post them in your accounting software and approve payment yourself, so a wrongly matched invoice is caught there.

  3. The result

    The same pattern works for any business that receives supplier documents by email and keeps one folder per project or customer.

Worked example

Beach Cities Builder is a general contracting firm in Hermosa Beach, California, run by Morgan Sterling, doing new construction, additions and remodels with 10 to 15 subcontractors on a typical job (OpenAI Academy story, 8 May 2026). Several subcontractor invoices arrive by email each day across about 30 active job folders. Before, each one meant opening it, identifying the project, entering the subcontractor, invoice number, amount due and payment details into Zoho Books and filing the document in the right Google Drive folder. With ChatGPT's help he built a script connected to his email that puts every invoice in one folder, reads it, identifies the job and moves it to the right place. The first version took about two hours to build, saves him roughly 5 to 6 hours a week, and he says the workflow is now effectively accurate every time. He also used ChatGPT to rebuild his website's SEO pages and metadata, which he credits with about 25% more inbound contacts, and a calendar script that adds a note when the seven day forecast shows more than a 40% chance of rain.

ChatGPT's part is writing the script and talking the owner through connecting it to his email; OpenAI's own guide points to Codex when the work is building an internal workflow tool. Any assistant that writes code, or Claude Code in the folder itself, produces the same script, and the email, Drive and accounting tools are whatever you already use.

Join the Agent OS Club

Get hours back with a team of AI agents for every department, set up step by step for the tools you use, with a person answering your questions. Founding member price: USD 14.95 a month or USD 150 a year, locked for as long as you stay. Cancel any time.

Founding offer, ends 31 December 2026 or at member 100

Join the Agent OS Club

Building this for an organization? Learn more at theagentiv.com

Sources

Published: 2026-11-14

Related use cases

Snap the tax invoice, the sheet fills itself

An agent that reads a receipt or tax invoice photo sent on LINE, checks the 13 digit tax ID, the Buddhist era date and the 7% VAT in code, logs the row to Google Sheets and tells the sender what still needs a look

FinanceEffort: An afternoonThailand
Clauden8nLINE+1

In a Thai shop or small company the receipts and tax invoices arrive as photos on LINE from whoever paid: a driver, a cook, the owner's spouse. Someone types the seller, the tax ID, the date in Buddhist era and the VAT into a sheet weeks later, and a wrong digit in the tax ID or a VAT line that does not add up only shows when the accountant prepares the monthly VAT return.

Cash reconciled in minutes, not an evening

An agent that reconciles each store's cash transactions against the bank deposits every month and hands the owner only the lines that do not match

FinanceEffort: An afternoon
ChatGPTAlso works with:ClaudeGeminiMicrosoft 365 Copilot

An owner with several stores or branches ends every month matching cash transactions from the point of sale against the deposits that actually reached the bank, line by line, store by store. It takes hours, it is easy to miss a short deposit, and it is the kind of job that slips when the month is busy.

Planning ideas flagged on every return

A Copilot agent that evaluates a client's tax return against the firm's planning frameworks and flags opportunities early, plus a quality checkpoint agent that routes work to national tax or estate and trust specialists before it advances, the way a US accounting firm of roughly 1,300 people runs it

FinanceEffort: About a week
Microsoft 365 CopilotAlso works with:ClaudeChatGPT

In a tax practice, planning opportunities are spotted by the people with the most experience, usually late, when the manager finally reviews the file. Junior staff prepare the return without seeing them, the second review by a specialist depends on someone remembering to ask, and there is no record of why a file did or did not get that review.