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.
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.
What does this prompt do?
- 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 do I need to use this?
- 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
How can I customize it?
- 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.
FAQs
Will this pay or post anything automatically?
What happens if an invoice is blurry or the total is hard to read?
What about attachments that are not invoices?
How does it know which vendor an invoice belongs to?
What if a supplier emails the same invoice twice?
Do I need the finance team to use Slack?
Related templates
When your flight moves, your calendar times get corrected automatically and you get a Slack note naming the meetings you're about to miss.
Every 15 minutes, forwarded phishing reports get traced back to the server that really sent them, with a verdict in Slack and the worst senders reported.
Every weekday at 7am, sign in to the tender portals you track, filter new notices against your bid criteria, and open a deal for the ones worth chasing.
Every Monday, rank the week's matches by expected demand, put the big ones on your venue calendar, and post a rota-ready summary to Slack.
Every Thursday, rank your team's upcoming flights by how likely they are to run late, and email the fixes while changes are still cheap.
Each month, spot the saved cards about to expire, email the customers still on recurring billing, and rank the revenue at risk in Slack.
Stop retyping vendor invoices into your accounting system.
Let invoices arrive, get read, and land in Zoho Books as drafts your team only has to approve.