PDF extraction

How to extract invoice data into Airtable with okraPDF and Zapier

Create a no-code invoice workflow: Gmail or Drive sends PDFs to okraPDF, then Zapier writes extracted fields into Airtable.

May 5, 2026 4 min read okraPDF

This workflow takes invoice PDFs from Gmail or Google Drive, sends them to okraPDF, and writes the extracted fields into Airtable. It is the no-code version of “upload invoice, get structured JSON, save a row.”

Use it when invoices arrive in many formats but your operations table needs the same columns every time: vendor, invoice number, invoice date, due date, total, currency, line items, and source PDF URL.

Zap templates

This workflow is clearest as two Zaps.

Template 1: okraPDF as an action. A source app starts the Zap and sends the invoice PDF into okraPDF.

StepZapier roleAppEvent
1TriggerGmail or Google DriveNew Attachment or New File in Folder
2ActionokraPDFUpload PDF (File)
3ActionAirtableCreate an intake row with job_id, file_id, and hosted_url

Template 2: okraPDF as a trigger. okraPDF starts the Zap after processing finishes.

StepZapier roleAppEvent
1TriggerokraPDFPDF Ready
2ActionAirtableFind or update the invoice row
3ActionSlack or EmailOptional review notification

Use the first template to ingest PDFs. Use the second template to write completed extraction results.

What you will build

The workflow:

  1. Receives an invoice PDF from Gmail or Google Drive.
  2. Uploads the PDF to okraPDF with an invoice extraction preset.
  3. Creates or updates an Airtable record with the extracted fields.
  4. Stores the okraPDF hosted PDF URL on the record for review.

Step 1: Prepare your Airtable table

Create an Airtable table named Invoices with columns like:

  • Vendor
  • Invoice number
  • Invoice date
  • Due date
  • Total
  • Currency
  • Status
  • Hosted PDF URL
  • okraPDF Job ID

Keep line items in a linked table if you need item-level rows. For a first pass, start with header-level invoice fields and add line items after the happy path works.

Step 2: Create the source trigger

Use whichever source matches how invoices arrive.

For Gmail:

  • App: Gmail
  • Event: New Attachment
  • Filter: attachment file name ends with .pdf

For Google Drive:

  • App: Google Drive
  • Event: New File in Folder
  • Folder: your invoice intake folder

Test the trigger with a real invoice PDF.

Step 3: Send the PDF to okraPDF

Add the okraPDF upload action. In this first Zap, okraPDF is an action.

  • Event: Upload PDF (File)
  • PDF File: map the Gmail attachment or Drive file
  • Filename: map the original file name
  • Processing Preset: Host + extract invoice fields
  • Tags: invoice,zapier

The action returns job_id, file_id, hosted_url, pdf_url, and poll_url. If your Zap needs extracted fields immediately, continue from the PDF Ready trigger so the extraction has finished before Airtable writes the row.

Step 4: Continue on PDF Ready

Add an okraPDF trigger in a second Zap. In this second Zap, okraPDF is the trigger.

  • Event: PDF Ready
  • Event type: document.processed

This trigger fires when okraPDF processing finishes. It includes the document IDs and URLs that downstream steps can use. If you are using the manual fallback, create a Webhooks by Zapier Catch Hook and register that hook URL in okraPDF webhook settings.

Step 5: Write the Airtable row

Add an Airtable action:

  • App: Airtable
  • Event: Create Record or Update Record
  • Base: your finance or operations base
  • Table: Invoices

Map the okraPDF output fields:

  • Hosted PDF URL: hosted_url
  • okraPDF Job ID: job_id
  • Status: ready
  • Filename: filename

Map extracted invoice fields once your extraction payload is available in the Zap. Keep hosted_url even if extraction fails, because it gives reviewers one click back to the source PDF.

Step 6: Add a failure path

Create one more Zap with the okraPDF PDF Failed trigger. This is also an okraPDF-as-trigger Zap.

Send failures to Slack, email, or an Airtable view with:

  • Filename
  • Job ID
  • Error message
  • Hosted PDF URL if available

This keeps invoice intake honest. A silent failed extraction is worse than a manual review queue.

Common fixes

If Airtable creates duplicate records, add a Find Record step keyed by invoice number or okraPDF file ID before Create Record.

If the attachment is not a PDF, add a Zapier Filter step before okraPDF.

If the extraction result is not ready, split the workflow into upload and PDF Ready Zaps instead of assuming the upload action has finished every engine.

If fields vary by vendor, add an Airtable “Needs review” status and keep the okraPDF URL on every row.

Production version

The production version uses the same shape but adds review states:

  • received
  • ready
  • needs_review
  • approved
  • exported

okraPDF handles the PDF upload, hosted source link, and extraction event. Airtable remains the operational table where humans approve edge cases.