Skip to content

Check supplier invoices against purchase orders

Each Monday, this workflow reads last week’s supplier invoices, checks each one against its purchase order, and tells you which invoices a person must look at.

  1. It finds the invoice PDFs in your Drive folder and in the supplier mails of the week, and reads each PDF.
  2. It reads your purchase order sheet.
  3. One AI step checks each invoice against its order: the vendor, the items, the quantities, the unit prices, the tax and the total. The step makes one model call for each invoice.
  4. Code counts the results. The workflow writes one sheet row for each invoice and mails you a summary.

Each invoice gets one status: matched, partial, mismatch, duplicate or no order. The summary gives the count of each status, the sum of the differences, and one line for each invoice to look at.

The workflow has 17 steps. Only the step that checks each invoice uses an AI model.

  • the Drive folder of the week’s invoice PDFs;
  • the mail address that the supplier mails come to;
  • your purchase order sheet;
  • a label for the check, which names the result sheet and the summary mail.

You change these values for each week. No step changes.

Gmail, Google Drive and Google Sheets, from one Google account that you connect.

A new Google Sheet in your folder, with one row for each invoice: file, invoice number, vendor, purchase order, status, difference and reason. A summary mail goes to you.

New invoices come every week, and each week the check is the same work. On a schedule, the check is ready on Monday morning. What starts a run shows how to set the schedule. In the build below, the person kept the schedule off for the first weeks and started each run by hand.

One chat in claude.ai with the Toolscaled connector: 6 messages from the person, 30 minutes. The person typed these messages. We replaced the mail addresses with brackets. The [bench invoices] tags mark the test data.

  1. Use Toolscaled. Every Monday I check last week’s supplier invoices for Halden Outdoor Supply Co., and I want this done for me. Here is what I do now:

    The invoices are the PDF files in my Google Drive folder “Toolscaled benchmark/invoice check/Invoices 2026-10-19 to 2026-10-25”, and the PDF attachments of the supplier mails to [invoice address] (the subject starts with “[bench invoices]”; one mail can carry more than one invoice). The purchase orders are in the Google Sheet “[bench invoices] Purchase orders” (one row per order line).

    For each invoice, I find its purchase order and compare the vendor, the items, the quantities, the unit prices, the tax and the total. I make a new Google Sheet “[bench invoices] Invoice check <label>” in the folder “Toolscaled benchmark/invoice check”, with one row per invoice and these columns: file, invoice number, vendor, purchase order, status, difference, reason. Status is one of: matched, partial, mismatch, duplicate, no_order. Difference is the invoice total minus what the purchase order gives for the billed items, in dollars (0.00 when they agree; empty for no_order).

    Then I mail myself ([my address]) a summary with the subject “[bench invoices] Invoice check <label>”: the count of each status, the sum of the differences, and a list of the invoices that a person must look at, each with one line why.

    The label is a tag I pick for each check; this time it is “build”.

    Please do it for this week first, so I can see it. Then make it something that runs by itself. Other weeks the invoices are in another folder, the mails come to another address and the orders can be in another sheet, so I need to be able to change those three and the label.

  2. Looks good. Yes, make the sheet and send it to me now.

  3. Monday mornings are right, but for the first weeks I want to start it myself. Leave the schedule off.

  4. Can you show me that it works by itself on this week’s invoices?

  5. Thanks. Please check now and tell me how it went.

  6. Your suggestion is fine. Yes, please make that change and run it again.

Claude did the check once in the chat, showed the result, and saved the workflow from it. In the first run by itself, one model call checked all the invoices together and took too long. Claude changed the step to check one invoice at a time, ran the workflow again, and its counts agreed with the check in the chat.

We ran the workflow on a test week that the build chat never saw: 23 invoices, 18 in a Drive folder and 5 in mails, against 19 orders. We compare it with an agent that did the same task from the same request. How we measured gives the method.

Workflow Agent
Time a run 19 s 232 s
Cost a run 26 credits, about $0.05 about $0.30
Tool calls 81 90
Invoices right, of 23 22 in 4 runs, 21 in 1 18
Same answer in 5 runs 0.991 one run

The build chat cost about $7.99 at list price, and your chat plan pays for it. At these numbers the build pays back after about 33 runs.