marjaanah-stack/ai-invoice-processing-automation
AI-powered invoice processing automation using OpenAI GPT-4o, Make.com, and multi-platform integrations. Extracts invoice data, routes approvals, and logs to Google Sheets with Slack notifications.
AI-Powered Invoice Processing Automation
An intelligent invoice processing workflow built with Make.com, OpenAI GPT-4o, and multi-platform integrations. Automatically extracts invoice data, routes for approval based on amount thresholds, and logs to Google Sheets with Slack notifications.
๐ฏ Business Problem
Finance teams waste 15-30 minutes per invoice on manual data entry, approval routing, and record-keeping. This automation reduces processing time to under 30 seconds per invoice with 95%+ accuracy.
โจ Features
- AI-Powered Data Extraction: Uses OpenAI GPT-4o to extract structured data from invoice text
- Smart Approval Routing: Conditional logic routes invoices based on amount:
- Under $1,000 โ Auto-approved
- $1,000-$5,000 โ Manager approval
- Over $5,000 โ CFO approval
- Multi-Platform Integration: Gmail, Google Sheets, Slack, OpenAI
- Structured Logging: All invoices logged to Google Sheets with timestamps
- Real-Time Notifications: Slack alerts for approvals and auto-approved invoices
๐๏ธ Architecture
Workflow Steps
- Email Trigger: Gmail monitors inbox for new invoices
- AI Extraction: OpenAI GPT-4o extracts:
- Invoice number, vendor name, dates
- Line items with quantities and amounts
- Tax, subtotal, total amounts
- Payment terms and PO numbers
- Data Parsing: JSON parser structures the extracted data
- Logging: Google Sheets records all invoice details
- Approval Routing: Router directs based on total amount
- Notifications: Slack messages sent to appropriate channels
Technology Stack
- Automation Platform: Make.com
- AI/ML: OpenAI GPT-4o API
- Email: Gmail API
- Database: Google Sheets
- Notifications: Slack API
- Data Format: JSON
๐ Extracted Data Fields
- Invoice Number
- Vendor Name & Address
- Invoice Date & Due Date
- PO Number
- Currency
- Line Items (description, quantity, unit price, amount)
- Subtotal, Tax Amount, Total Amount
- Payment Terms
๐ Demo
Input: Invoice Text Email
SUMMIT ENERGY SOLUTIONS
Invoice #: INV-2024-1847
Date: September 15, 2024
Total: $32,420.88
Output: Structured JSON
{
"invoice_number": "INV-2024-1847",
"vendor_name": "SUMMIT ENERGY SOLUTIONS",
"total_amount": 32420.88,
"line_items": [...]
}๐ Result:
โ
Logged to Google Sheets
โ
Routed to CFO approval (over $5K)
โ
Slack notification sent
๐ Business Impact
Time Savings: 15-30 min โ 30 seconds per invoice
Accuracy: 95%+ extraction accuracy
Scalability: Handles unlimited invoices
Cost: ~$0.02 per invoice (OpenAI API costs)
๐ง Technical Implementation
Make.com Scenario Configuration
Modules Used:
- Gmail - Watch Emails (trigger)
- Router (conditional logic)
- OpenAI - Create Chat Completion (GPT-4o)
- JSON - Parse JSON
- Google Sheets - Add Row
- Router (approval thresholds)
- Slack - Create Message (ร3 paths)
OpenAI Prompt Engineering
Custom system and user prompts ensure consistent JSON output with specific data structure. Temperature set to 0 for deterministic extraction.
Error Handling
- Filter conditions prevent processing non-invoice emails
- JSON parser validates structured output
- Slack notifications confirm successful processing
๐ Current Limitations & Roadmap
Current Implementation
โ
Processes invoice text from email body
โ
Handles multiple currencies and formats
โ
Conditional approval routing
โ
Real-time logging and notifications
Known Limitations
- Option A: Paid PDF extraction service (PDF4me, Adobe PDF Services)
- Option B: Custom Gmail API integration for attachment handling
- Option C: OCR service for scanned invoices
Future Enhancements
- PDF attachment processing
- OCR for scanned invoices
- Multi-currency conversion
- Vendor database integration
- Duplicate invoice detection
- Approval workflow automation (button clicks in Slack)
- Payment scheduling integration
๐ Skills Demonstrated
- AI Integration: OpenAI API, prompt engineering
- Workflow Automation: Make.com scenario building
- API Integrations: Gmail, Google Sheets, Slack
- Data Transformation: JSON parsing, data mapping
- Conditional Logic: Multi-path routing
- Financial Processes: Invoice processing, approval workflows
๐ธ Screenshots
Make.com Workflow Diagram
Sample Invoice Input
OpenAI Extraction Output
Google Sheets Log
Slack Notifications
๐ Setup Requirements
- Make.com account (free tier works)
- OpenAI API key (GPT-4o access)
- Gmail account
- Google Sheets
- Slack workspace
๐ง Contact
Marjaana Peeters
AI Finance Automation Enthusiast
LinkedIn: www.linkedin.com/in/marjaana-peeters-0442a4





