# Turn emailed vendor invoices into draft Zoho Books bills

> When an invoice lands in your inbox, we read it, match the vendor, and file a draft bill in Zoho Books for someone to approve in Slack.

- Workflow type: agent
- Services: Gmail, Zoho Books, Slack
- Categories: Finance, Operations
- Published: 2026-08-10

## What it does

- Watches your inbox for new email attachments and works out which ones are genuinely vendor invoices, ignoring contracts, bank statements, and marketing PDFs.
- Reads the invoice and pulls out the vendor, invoice number, issue and due dates, currency, line items, tax, and total.
- Files it in Zoho Books as a draft bill, matched to the right vendor and coded to the right expense account, so nothing is ever booked without a person saying yes.
- Posts an approval message in Slack with the vendor, total, due date, and a link back to the original email, calling out large amounts and likely duplicates.

## What you'll need

- A Gmail account that receives your vendor invoices
- A Zoho Books account with permission to create vendors and bills
- A Slack workspace and a channel where your finance approvals happen
- A rough idea of the expense accounts you use, so invoice lines get coded sensibly

## Prompt

Whenever a new email with an attachment arrives in my Gmail inbox, I want you to work out whether the attachment is a vendor invoice or bill, and if it is, get it into Zoho Books as a draft bill waiting for a human to approve. Use the Gmail poll trigger for new attachments so this runs as each one lands.

Start by pulling the file down with the Gmail Get Attachment operation and reading it. It will usually be a PDF, but scanned images are common too, so handle both. Before extracting anything, decide what the document actually is. Plenty of attachments are not payables: contracts and signed agreements, bank and credit card statements, marketing or sales PDFs, receipts already expensed, quotes and proposals, and ordinary email signatures or images. If it is not a vendor invoice or bill addressed to us, stop there and do nothing. Do not create a bill and do not post to Slack for these.

When it is a bill, extract the vendor name, the invoice or bill number, the issue date, the due date or payment terms, the currency, the individual line items with their descriptions and amounts, the subtotal, the tax, and the total. Be strict about confidence here. If you cannot read the vendor name or the total reliably, stop and do not create anything rather than guessing. A wrong amount or a bill against the wrong vendor is much more costly to unpick than an invoice you skipped, so when the document is ambiguous, leave it alone and say why.

Next, match the vendor. Use List Contacts in Zoho Books to search for an existing vendor matching the name on the invoice, allowing for the usual variations in legal suffixes, trading names, abbreviations, and punctuation. Only if there is genuinely no confident match should you create a new vendor with Create Contact, using the name and any billing details, email, or address you can read off the invoice. Do not create a near duplicate of a vendor that already exists.

Before recording anything, check for duplicates. Use List Bills to look at existing bills for that vendor and compare the invoice number, the total, and the invoice date. Vendors often resend the same invoice as a reminder, and forwarded email chains can deliver the same PDF twice. If you find something that looks like the same bill already in Zoho Books, still surface it in Slack but flag it clearly as a probable duplicate with a pointer to the existing bill, and do not quietly create a second copy.

To code the bill, call List Chart of Accounts and pick the expense account that best fits what was actually purchased, using the line item descriptions to guide you. Software subscriptions, professional fees, travel, utilities, marketing spend, and office supplies usually each have their own account. If the invoice covers several different kinds of spend, split the line items across the appropriate accounts rather than dumping the whole total into one. When nothing fits well, choose the most sensible general expense account and say plainly in Slack that the coding needs a second look.

Record it with Create Bill in draft status, never as an approved or open bill. Map across the vendor, invoice number, issue date, due date, currency, and the line items with their chosen expense accounts, along with tax and total. Draft status is the whole point of this workflow: nothing should be posted to the ledger or queued for payment without a person looking at it first.

Finally, post to Slack with Send a Message so a human can approve it. Include the vendor name, the total with its currency, the due date, the invoice number, the expense account or accounts you mapped it to, and a link back to the original Gmail message so the approver can open the source email and see the attachment themselves. Do not try to attach the source PDF to the bill in Zoho Books; the link back to the email is how the reviewer gets to the document.

Two things need to be called out explicitly in that Slack message. First, flag any bill whose total is above a configurable threshold, defaulting to 2,500 in our base currency, so large payables get a closer look. Second, flag anything you suspect is a duplicate of an existing bill. Keep the message short and skimmable so someone can approve or reject at a glance, and if you had to make a judgement call on the vendor match or the account coding, note that too.

## How to customize

- Change the amount that gets an extra warning in Slack. The default flags anything over 2,500.
- Send approvals to a different Slack channel, or to one person instead of a whole team.
- Narrow which emails count, for example only those sent to your accounts payable address or from known suppliers.

## FAQ

### Will this pay or post anything automatically?

No. Every bill is created in draft status and waits for a person. The Slack message is the approval step, so someone always reviews the vendor, amount, and account coding before the bill is finalised or paid.

### What happens if an invoice is blurry or the total is hard to read?

It stops rather than guessing. If the vendor name or the total cannot be read confidently, no bill is created and the invoice is left for you to handle by hand. Wrong numbers in your accounts are far more expensive than a skipped one.

### What about attachments that are not invoices?

They are ignored. Contracts, bank statements, signed agreements, marketing PDFs, and general email attachments are filtered out, so only genuine vendor bills reach Zoho Books.

### How does it know which vendor an invoice belongs to?

It checks your existing Zoho Books contacts first and reuses a match when it finds one. A brand new vendor record is only created when there is genuinely no confident match, which keeps your vendor list from filling up with duplicates.

### What if a supplier emails the same invoice twice?

Before creating anything it looks at bills already in Zoho Books for the same vendor, invoice number, and amount. Anything that looks like a repeat is flagged clearly in the Slack message so you can skip it.

### Do I need the finance team to use Slack?

Yes, for the approval step as written. Slack is where the bill summary and the link back to the original email get posted, so whoever approves payments needs access to that channel.

Use this prompt in General Input: https://www.generalinput.com/prompts/turn-emailed-vendor-invoices-into-draft-zoho-books-bills