AI Workflow Automation

Invoice Processing That Actually Works

The Challenge

AP teams spend most of their day doing manual work. They extract data from invoices that come in different formats. They chase approvals. They fix errors. Skilled finance people end up doing data entry instead of actual finance work. Most AP departments spend about 85% of their time on tasks that could run automatically. This causes real problems: missed early payment discounts, duplicate payments, late vendor payments, and damaged vendor relationships. Traditional OCR tools don't solve the problem. They struggle with different invoice formats and need lots of manual checking. The work just shifts from data entry to error fixing. Finance teams are still stuck doing repetitive tasks instead of strategic work. The result: finance departments become bottlenecks instead of helping the business grow.

Our Approach

I built a serverless AP assistant that takes vendor invoices in any format, converts them to structured data, checks them against your accounting records, and either posts them to QuickBooks automatically or sends them to your team for review.

Core Architecture:

  • Email/Upload: Incoming PDFs go straight to the processing queue
  • PDF Parsing: Extracts text from any vendor format
  • Data Cleaning: Removes sensitive fields before AI processing
  • LLM Structuring: Unstructured text converted into schema-validated JSON
  • Validation Gateway: QuickBooks lookup and JSON comparison to verify vendor, line items, and totals
  • Human Review: Sends exceptions to Slack for approve/reject with full context
  • Audit Trail: Stores all events and decisions in Firestore
  • Auto-Scaling: Google Cloud Run handles any workload size

Key Technical Innovations

Consistent AI Output

AI responses are validated against a JSON schema so each step gets clean, structured data

Better Matching

Fuzzy vendor matching and tolerances cut down on false alerts

No Duplicate Processing

Retry logic prevents the same invoice from being processed twice during failures

Slack Review

Approvers see exactly what's different and can approve or reject right in Slack

Full Audit Trail

All events and decisions are saved in Firestore so you can search and review them later

Predictable Costs

Cloud Run is configured to scale efficiently without surprise bills

Automated Workflow

Email/Upload Trigger
PDF Text Extraction
PII Sanitization
LLM Structuring
Validation Gateway
Passes Validation
QuickBooks QueryJSON ComparisonAuto Bill Creation
Invoice Validated & Bill Created
Vendor: Books by Bessie
Total Amount: $1673.82
Bill Created: Yes ✅
Bill Amount: $1673.82
Invoice #: ITEM-PO-250807-002
Data Match: All fields match ✅
Bill ID: 343
Status: Ready for payment
Exception Detected
QuickBooks QueryJSON ComparisonSlack Review
⚠️Invoice Discrepancy Detected
Vendor: Bob's Burger Joint
Vendor Match:
Line Items Match:
Invoice #: ITEM-PO-20250801-001
Total Match:
Issues Found: 1
Detailed Differences:
1. Line Item 4 Mismatch:
Unit Price: $379.50 vs $126.50
Line Total: $421.18 vs $425.18
Vendor Invoice Total: $3029.50Purchase Order Total: $3029.50
Action Required:
✅ Approve
❌ Reject
📋 View Details

Results & Impact

This AP assistant turns invoice processing from a time sink into a clean, automated workflow. The time your team used to spend retyping and reconciling invoices can now go toward quick reviews and smart decisions.

From invoice arrival to QuickBooks posting, the process is straightforward. Vendor PDFs come in, get parsed, and validate automatically. No manual retyping. Most invoices post without anyone touching them. Your team only steps in when something needs human judgment.

Business outcomes

Lower costs

Less rework and fewer handoffs mean faster processing and smaller backlogs. Teams handle more invoices without overtime or contractors.

More revenue

Consistent on-time processing means you can catch early payment discounts and keep vendors happy.

Better accuracy

Checks against your accounting records and Slack approvals stop duplicate or wrong payments before they happen.

More efficiency

Teams process more invoices without hiring more people. The time saved goes to work that actually moves the business forward. Some AP team members save about 15 hours each week.

Tech Stack

Python
FastAPI
Pydantic
OpenAI / LLM
QuickBooks Online API
Slack API
Google Cloud Run
Google Firestore
Google Cloud Storage
Python
FastAPI
Pydantic
OpenAI / LLM
QuickBooks Online API
Slack API
Google Cloud Run
Google Firestore
Google Cloud Storage