Supplier invoices, out of the inbox and into the books
When a supplier invoice lands in the AP inbox…
- 1An Inbox trigger picks up the email and passes its body down the chain. Plain-text invoices read cleanly; HTML mail arrives as raw MIME, and attachments aren’t read.
- 2A Claude (API) step pulls out the vendor, invoice number, amount and due date as JSON.
- 3A Code step parses that JSON and fails the run if a field is missing, so a half-read invoice never reaches the books.
- 4A QuickBooks step creates the bill through a custom request. Rather have a person post it? Append a row to a review sheet instead.
- 5If the check fails, a failure handler posts the error to the AP channel in Slack.
Invoices that read cleanly go straight through. The ones that don’t arrive in Slack with the reason attached.