← Back to blog

Invoice OCR to Airtable with Zapier and Cryvis

Drive New File → Cryvis Invoice API → Airtable Create Record. Field types, bases, and status for AP intake.

What we're building

Same Cryvis invoice extraction as the Sheets tutorial, different destination. Drive drops a PDF; Zapier calls Cryvis; Airtable gets a typed AP record — number, dates, currency, vendor, totals, status — ready for human review.

Google Drive: New File in Folder
        |
        v
Webhooks by Zapier: Custom Request
  POST https://api.cryvis.com/v1/documents/invoice
  multipart: file
        |
        v
Filter: success is true
        |
        v
Airtable: Create Record
  Status = Received
  + header fields typed for currency / dates
  + Drive file name + link

Sheets twin: Extract invoice data → Google Sheets. Hub: Zapier + Cryvis.

What you need

  • Zapier + Google Drive connection
  • Airtable base with an AP Inbox table (schema below)
  • Cryvis API key — Invoice API
  • Sample invoice PDF/JPEG/PNG/WebP

Credits: 1 per PDF page or image.

Airtable base design

Create a base (e.g. AP Automation) and a table AP Inbox:

FieldTypeWhy
Invoice NumberSingle line textPrimary search / dedupe
Invoice DateDateSort and aging
Due DateDatePayment queue
CurrencySingle selectUSD, EUR, INR, …
VendorSingle line textMaps seller.name
BuyerSingle line textMaps buyer.name
SubtotalCurrency or NumberMaps subtotal
TaxCurrency or NumberMaps tax_total
TotalCurrency or NumberMaps total_amount
Amount DueCurrency or NumberMaps amount_due
StatusSingle selectReceived, Review, Paid
Source FileSingle line textDrive filename
Drive URLURLOptional open-in-Drive link
Raw Line ItemsLong textOptional JSON dump of line_items
Processed AtDate (include time)Audit

Currency-type columns keep finance views clean; if Zapier maps strings into Currency fields inconsistently, use Number and format in Airtable views instead.

Do not make line_items a linked-record table in v1 — one document → one row. Expand line items later if AP needs them.

Create the Zap

  1. Google Drive — New File in Folder
  2. Webhooks by Zapier — Custom Request
  3. Filtersuccess is true
  4. Airtable — Create Record

Optional: Paths after Filter — e.g. Path A when total_amount ≥ 5000 → Status Review; Path B otherwise → Status Received.

Configure Cryvis HTTP

Required shape:

PieceValue
MethodPOST
URLhttps://api.cryvis.com/v1/documents/invoice
HeaderAuthorization: Bearer <API_KEY>
Bodymultipart/form-data
Partfile = Drive binary

Multipart reference: Send multipart form data. Docs: extractInvoice.

Example response

{
  "success": true,
  "data": {
    "invoice_number": "INV-2024-00142",
    "invoice_date": "2024-03-15",
    "due_date": "2024-04-14",
    "currency": "USD",
    "seller": { "name": "Acme Cloud Services", "tax_id": "US12-3456789" },
    "buyer": { "name": "Globex Corporation" },
    "line_items": [
      {
        "description": "Platform subscription",
        "quantity": 1,
        "unit_price": 999.0,
        "amount": 999.0
      }
    ],
    "subtotal": 1148.98,
    "tax_total": 94.79,
    "total_amount": 1193.77,
    "amount_due": 1193.77
  },
  "meta": {}
}

Destination mapping

Airtable — Create Record (base + table from above):

Airtable fieldSource
Invoice Numberdata.invoice_number
Invoice Datedata.invoice_date
Due Datedata.due_date
Currencydata.currency
Vendordata.seller.name
Buyerdata.buyer.name
Subtotaldata.subtotal
Taxdata.tax_total
Totaldata.total_amount
Amount Duedata.amount_due
Statusstatic Received (or Path-selected value)
Source FileDrive file name
Drive URLDrive web view link if exposed by the trigger
Raw Line ItemsFormatter → stringify data.line_items (optional)
Processed Atcurrent datetime

Single select for Currency: if Cryvis returns a code not in your options, Airtable may reject the create. Pre-seed common currencies or map unknown codes to Other with a Formatter step.

Filters, Paths, errors

Filter after Drive: filename extension in .pdf / .jpg / .jpeg / .png / .webp.

Filter after HTTP: only continue if success is true.

Paths (optional):

Path A: data.total_amount (Number) greater than 5000
  → Create Record with Status = Review
Path B: fallback
  → Create Record with Status = Received

On 401/400, Zap history on the Custom Request step shows the body. Do not retry endlessly on 400 — fix part name or MIME first.

Troubleshooting

SymptomLikely causeFix
Airtable create fails on CurrencySelect option missingAdd the code or map via Formatter
Dates blankString vs Date fieldEnsure ISO YYYY-MM-DD; use Formatter if needed
Vendor emptyMapped seller objectUse data.seller.name
Duplicate AP rowsDrive re-triggerMove file after success; search Airtable by Invoice Number before create

Test

  1. Drop one known invoice into Drive.
  2. Run the Zap (or wait for the trigger).
  3. Zap history: Custom Request → 200, success: true.
  4. Open Airtable: Status Received, Total matches the PDF, Currency select populated.
  5. Re-run only if you accept duplicates.

Production notes

  • Restrict the Airtable base to AP ops; invoice totals and vendor tax IDs are sensitive.
  • Archive Drive files after success so New File stays quiet.
  • For Gmail → Sheets + Slack instead of Airtable, use Automate invoice processing.
  • Plan credits for multi-page PDFs before enabling a busy shared Drive folder.