# Process, validate, and approve invoices with OpenAI GPT-4o and Google Sheets

> Quick overview This workflow receives invoice PDFs via a webhook, extracts and validates invoice data with OpenAI, checks for duplicates in Google Sheets, and routes invoices for automatic or manual approval while notifying vendors and finance via Gmail. How it works 1. Receives an invoice submission via a POST webhook that includes vendor details and a PDF file. 2. Extracts text from the PDF and uses OpenAI to convert it into structured invoice fields (amounts, dates, line items, and payment info). 3. Normalizes the extracted data, validates required fields, and emails the vendor via Gmail if key fields are missing. 4. Searches Google Sheets for an existing invoice with the same invoice number and, if found, flags it as a duplicate and notifies finance by email. 5. For non-duplicate invoices, uses OpenAI to categorize the invoice and assess priority, risk level, and whether approval is required, then verifies the total matches subtotal plus tax. 6. Auto-approves low-value, low-risk in

- **Domain**: `n8n-workflow-19739.n8n.io`
- **Provider**: n8n.io (https://n8n.io)
- **Kind**: workflow
- **Live-responds (last probe)**: None
- **Signed card**: False
- **Streaming**: False
- **Quality score**: 40%

## URLs
- Agent card: https://n8n.io/workflows/19739
- Page (HTML): https://agenstry.com/agents/n8n-workflow-19739.n8n.io
- Documentation: https://n8n.io/workflows/19739
