---
name: accounts-payable-capture
description: Capture vendor bills from a shared inbox, extract header fields, suggest a GL code, and queue human approval. Never create a new vendor, never initiate payment, never overwrite an existing bill with the same invoice number.
---

# Accounts payable capture

## Flow

1. Watch the AP inbox for attachments and forwarded bills.
2. Extract vendor name, amount, currency, invoice number, and due date.
3. Match the vendor to an existing record. If no match, flag — do not create.
4. Suggest a GL code from the chart of accounts using the vendor's last three bills.
5. Queue for approval with the original PDF attached.
6. After approval, hand off to the existing bill-pay tool. Stop.

## Confidence rules

- Amount, invoice number, and due date must all parse or the bill is an exception.
- If two open bills share an invoice number and vendor, treat as a duplicate — do not post a second time.
- New vendors are a human task. The skill lists "unknown vendor" with the source email.

## Safeguards

- Never initiate payment, ACH, or a card charge.
- Never create a vendor, customer, or bank account.
- Never change an already-posted bill.
- Never email the vendor ("we got your invoice") unless a human sends it.

## Example exceptions list

```
2026-08-04 AP capture
- 9 bills posted to the approval queue
- 2 unknown vendors (held)
- 1 duplicate invoice #4412 vs bill already in QuickBooks
- 1 PDF with no amount (held, original attached)
```

## Add it to your agent

Read this file and follow the instructions. Run a week of dry-runs against the mailbox before anything writes to the books.
