Stop Typing Bills: An AI Agent That Does It For You (Free Template)

 What if I told you I built a $70 million app using a single AI agent? Well, you wouldn't believe me because that's ridiculous. But I did do something pretty close.

Hubdoc automated bill capture years ago, before Xero bought it for $70 million. In a couple hours, I built the core functionality of Hubdoc with a no-code AI agent platform. Here’s how it works and a template you can copy to set up this agent for yourself.

Watch the demo

Clone my agent

Use my template as a starting point and customize it for your chart of accounts, tax rules, and tools.

👉 Copy the Zapier Agents template

What the agent does

  1. Catches your forwarded email to a secret address and grabs the PDF attachment.

  2. Converts the PDF to structured text using PDF.co so the agent can “see” the invoice reliably.

  3. Parses the invoice, finds or matches the vendor, and pulls your chart of accounts.

  4. Allocates sales tax across line items proportionally using the agent’s calculator tool.

  5. Chooses expense accounts based on the contact history or your fallback rules.

  6. Creates a draft bill, uploads the PDF attachment, then emails you a link to review & approve.

  7. The draft bill total matches the source invoice, with unit prices adjusted to include the allocated tax.

How it works

  • Trigger: Email parser step in a Zap (unique forwarding address).

  • OCR/Structure: pdf.co → JSON Meta output.

  • Agent run: Find contact, fetch chart of accounts, compute/allocate tax, map accounts, create bill (draft), upload attachment, send email.

  • Safety rail: The agent only creates draft bills so nothing gets approved or paid without human review.

Setup checklist

  1. Build the Zap: Email by Zapier > PDF.co > Agents. I can’t share the template for this zap with you because Zapier Agents is in beta right now, but you reconstruct it using these settings (see screenshots).

  2. Copy the Zapier Agent into your account from the template.

  3. Connect the Zap to the Agent.

  4. In the Agent “Add tools” settings:

    1. Configure the Xero tools to access a single organization so the agent can’t search in or post to the wrong org. Limit the Create Bills tool to Draft status.

    2. Hard-code the “To:” in the Email by Zapier step to your address to prevent messages from going anywhere else.

  5. Tune the instruction set when you notice repeated mistakes. Agents don’t learn between runs—your instructions are everything.

Customizing coding rules

You can edit the Instructions to add keyword-based fallbacks to steer line-item account selection (e.g., any line with “AWS” → Cloud Hosting).

QuickBooks instead of Xero?

No problem. Swap the Xero tools for QuickBooks in the agent, update the instructions, and you’re off.

Limitations & easy upgrades

  • This agent can only handle PDFs attached to emails. If you get Word attachments or the email itself is the bill (no attachment), you’d need to add a conversion step before the pdf.co extraction.

  • It’s a pain to add fallback instructions for coding. If you wanted to avoid having to edit the agent’s instructions,, you could create a “coding manual” in Google Docs and instruct the agent to look up vendors/keywords there for consistent coding—just like a human bookkeeper would.

Why this matters

We’ve used tools like Hubdoc for years to kill data entry. Agents let us recreate that magic without coding and go even further with line-level data extraction and allocations. The result? Faster, cleaner bookkeeping and more time for higher-value work.

Grab the template

👉 Copy the Zapier Agents template

Questions or ideas to improve it? Send me a message.

Next
Next

Join Me on the Advisory Amplified Tour – Live Podcast Across Six Cities