A national cannabis company operating under multiple business entities came to us with an unusual invoicing challenge. While most vendors sent PDF invoices, a core group of their vendors were sending Quickbooks invoices directly in email bodies - no attachments, just raw text embedded in emails.
"When it comes in from their Quickbooks account... the email is from notification@quickbooks.com instead of from the vendor's actual email," our automation specialist explained. These emails needed to be turned into bills in their own Quickbooks system, but traditional automation methods were failing.
The Hidden Complexity
What seemed like a simple email-to-Quickbooks sync revealed deeper challenges:
Vendors appeared under different names across systems (e.g., "Connex Inc" vs "Connex", or using doing-business-as names)
Each vendor's Quickbooks email format was slightly different
Duplicate invoices were common as vendors resent bills
The company needed to maintain proper audit trails across divisions
"We need to verify the name, pull the invoice number, get the total amount... but every format is different," noted their accountant. Manual processing was error-prone and time-consuming.
The Technical Challenge
Most invoice automation solutions handle PDF attachments well, but struggle with emails where invoice details are embedded in the body text. This national company faced exactly that problem - vendors sending Quickbooks invoices directly in email bodies, with no standard format.
Traditional approaches would require:
Complex regex patterns
Custom rules per vendor
Constant maintenance as formats change
Manual handling of exceptions
The AI Solution
Using AI by Zapier's Analyze and Return Data action, we built a system that intelligently extracts invoice data from unstructured email content. The key innovation was using multiple extraction attempts with different contexts:
Prompt sample (simplified):
Extract the following from the email:
- Invoice number
- Total amount
- Vendor name
- Due date (if present)
Check these locations in order:
1. Subject line
2. Email body
3. From name field
Return values in specified format...
Three-Layer Validation
The system runs three parallel extractions:
Subject line parse: Looks for clear invoice markers
Body content analysis: Deep scans for invoice details
Sender analysis: Cross-references sender info
Results are then merged with precedence rules to ensure accuracy.
Vendor Name Matching Innovation
A particularly clever use of AI by Zapier was handling vendor name variations. The prompt instructs the AI to:
Remove common suffixes (LLC, Inc, etc.)
Handle missing/extra punctuation
Match abbreviated forms
Results in Production
After implementation:
Successfully processed 7 invoices in the first day
100% accuracy on data extraction
Zero maintenance needed for new formats
System learns from each new vendor style
Why This Matters
Traditional OCR and rule-based systems struggle with email body invoices because there's no consistent visual layout to parse. AI by Zapier's natural language understanding makes it possible to reliably extract structured data from unstructured text.
Technical Lessons Learned
Multiple extraction attempts provide better reliability than single passes
Prompt engineering is critical - careful instruction of the AI model improves accuracy
Validation rules should still safeguard AI output
Feedback loops help improve accuracy over time
Would you like me to expand on any of these technical aspects?
Need support setting this up? We can help!
Unlock the potential of automating your invoice processing with our AI-driven solution using QuickBooks Online and Zapier. Transform complex email invoices into seamless entries in your accounting system with ease. Book a call with us to get started!
Notion custom agents switch to paid credits May 4, 2026. Learn how to audit your usage, narrow triggers, and optimize agent workflows before the meter starts.
Learn how to build a Notion custom agent that delivers personalized daily briefings to your team — pulling calendar events, tasks, and meeting context automatically.
One sales call, three automated outputs — content brief, follow-up email, and sales briefing — all triggered automatically in Notion. Here's how to build the system.