How to Extract Invoice Data from PDFs with AI Vision in Make.com
Use a GPT vision model in Make to pull totals and dates out of uploaded invoices and log them as structured data.
Typing invoice details into a spreadsheet is error prone. This scenario sends each uploaded invoice image to a GPT vision model, asks for the key fields as JSON, and writes a clean row to your accounting sheet.
- A Make.com account
- A folder or email inbox where invoices arrive
- An OpenAI API key with a vision capable model such as gpt-4o
- A Google Sheet to receive the data
Step 1: Catch the incoming invoice
Use a Google Drive Watch Files module on an Invoices folder, or an email trigger that grabs attachments. For image invoices this works directly; for PDFs, convert pages to images first since vision models read images.
Step 2: Encode the image
Vision models accept an image as a URL or base64 data. Download the file with the relevant module, then in the OpenAI module reference the binary so Make sends the image data along with your text prompt.
Step 3: Prompt for structured fields
Add OpenAI Create a Completion (Chat) with a vision model. Attach the image content and a system message that lists the exact fields to return. Demand JSON so the output is parseable.
You read invoices. Look at the image and return ONLY this JSON:
{
"vendor": string,
"invoice_number": string,
"date": "YYYY-MM-DD",
"total": number,
"currency": string
}
If a field is missing use null. Do not guess.Step 4: Parse and log
Add a JSON Parse JSON module, then a Google Sheets Add a Row module. Map vendor, invoice number, date, total, and currency into their columns. Add a link back to the original file for an audit trail.
Step 5: Validate before trusting it
Run a handful of real invoices and compare the extracted totals against the documents. Once you trust the output, add an error handler so a failed parse routes to a review folder instead of stopping the scenario.
Result: invoices that land in your folder become clean, searchable accounting rows in seconds, with original files linked for verification.
Watch related tutorials
25:00
12:05
18:30
32:08
21:45
28:30