Decide the columns before the first run
Write the columns you need for reconciliation, not everything an invoice might contain. A practical set is vendor, invoice number, invoice date, amount, currency, due date, and the source message.
Add a status column from day one: extracted, needs review, approved. Status is what makes the table usable by someone other than the person who built it.
Pull the attachment, keep the message
Each row should keep the message ID and the attachment name. When a number looks wrong, you need to open the original email, not a copy of a copy.
Handle the three common shapes separately: the invoice in the body, the invoice as a PDF attachment, and the invoice behind a vendor portal. The third one needs a sign-in, which is a manual step by design.
Read the fields, then flag the gaps
Ask AI to fill the row from the attachment and leave a cell empty when the field is missing. An empty cell is a signal; a guessed amount is a liability.
Then run the checks that catch most errors: the amounts add up, the invoice number is not a duplicate, the date is not in the future, and the currency matches the vendor. A row that fails a check goes to review, not to the books.
Review in one sitting
Batch review beats piecemeal review. Open the review queue once a day, sort by amount and due date, and approve in bulk where the checks pass.
Keep the reason for each manual correction. After a month, the corrections show you which vendor format needs a new rule, and which field is consistently missing.
How to run it on Mesocosm
Keep the mailbox, the extracted table, and the source messages in one workspace. Ask AI to process a batch, then review the flagged rows in the render view. When the format is stable, add a scheduled task that runs the extraction and leaves the review to you.
For the sorting layer, read the AI email triage workflow. For the finance side, the AI investment research workflow shows how the same evidence habit applies to research notes.
How to judge whether this works for you
| Check | What to run | Passes when | Fails when |
|---|---|---|---|
| Column check | Extract ten invoices and confirm each of the six fields is populated or deliberately blank. | Every blank has a stated reason. | An unexplained blank row passes as complete. |
| Duplicate test | Run the same invoice twice under different filenames. | The repeated invoice number is flagged. | A second payable-looking row appears. |
| Arithmetic check | For ten rows, compare line items plus tax with the invoice total. | Every row adds up or is sent to review. | A row that does not add up reaches the books. |
| Source trace | Pick three rows and open the source message and attachment from the row. | One click reaches both. | The source is buried in the transcript. |
| Currency test | Extract two invoices in different currencies. | Currency is a column and totals are not summed across it. | A total mixes currencies. |
| Body-vs-attachment test | Extract one invoice in the mail body and one PDF attachment. | Both rows carry the source type. | One of the two is skipped or loses its source. |
Two limits
Input limit: scans, photos, and body-only invoices
OCR can misread a decimal, and layout extraction can swap billed-to and ship-to. A body-only invoice has no fixed layout at all. A plausible wrong number is worse than a blank, because it passes the eye test and fails the reconciliation.
Capability limit: extraction is not accounting
The workflow reads fields and proposes matches; it does not post to the ledger, validate tax treatment, or decide whether an expense is deductible. Approval and accounting treatment remain with a person.
Common questions
Can it read invoices embedded in the email body?
It can read text in the body, but the layout is less stable than a PDF attachment. Keep the message as the source and send body-only invoices to review when the amount or due date is ambiguous.
How many credits does 100 invoices use?
It depends on pages and retries: each attachment read is an AI call, and scans add OCR. Run ten, read the ledger, then estimate 100. Split by vendor so one bad format does not consume the batch.
What happens when two totals disagree?
The row stays unapproved and goes to review. Keep the line-item total and the printed total beside the row so a person can decide which is wrong; do not let the workflow pick the larger or newer number.
How is this different from a spreadsheet import?
A spreadsheet import trusts the columns it is given. This reads the invoice, keeps the source message, and routes ambiguous rows to review; the check step is the product.
Next step
Pick one vendor, extract ten invoices, and check the rows against the original messages before you widen the batch.