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 + linkSheets 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:
| Field | Type | Why |
|---|---|---|
| Invoice Number | Single line text | Primary search / dedupe |
| Invoice Date | Date | Sort and aging |
| Due Date | Date | Payment queue |
| Currency | Single select | USD, EUR, INR, … |
| Vendor | Single line text | Maps seller.name |
| Buyer | Single line text | Maps buyer.name |
| Subtotal | Currency or Number | Maps subtotal |
| Tax | Currency or Number | Maps tax_total |
| Total | Currency or Number | Maps total_amount |
| Amount Due | Currency or Number | Maps amount_due |
| Status | Single select | Received, Review, Paid |
| Source File | Single line text | Drive filename |
| Drive URL | URL | Optional open-in-Drive link |
| Raw Line Items | Long text | Optional JSON dump of line_items |
| Processed At | Date (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
- Google Drive — New File in Folder
- Webhooks by Zapier — Custom Request
- Filter —
successis true - 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:
| Piece | Value |
|---|---|
| Method | POST |
| URL | https://api.cryvis.com/v1/documents/invoice |
| Header | Authorization: Bearer <API_KEY> |
| Body | multipart/form-data |
| Part | file = 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 field | Source |
|---|---|
| Invoice Number | data.invoice_number |
| Invoice Date | data.invoice_date |
| Due Date | data.due_date |
| Currency | data.currency |
| Vendor | data.seller.name |
| Buyer | data.buyer.name |
| Subtotal | data.subtotal |
| Tax | data.tax_total |
| Total | data.total_amount |
| Amount Due | data.amount_due |
| Status | static Received (or Path-selected value) |
| Source File | Drive file name |
| Drive URL | Drive web view link if exposed by the trigger |
| Raw Line Items | Formatter → stringify data.line_items (optional) |
| Processed At | current 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 = ReceivedOn 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
| Symptom | Likely cause | Fix |
|---|---|---|
| Airtable create fails on Currency | Select option missing | Add the code or map via Formatter |
| Dates blank | String vs Date field | Ensure ISO YYYY-MM-DD; use Formatter if needed |
| Vendor empty | Mapped seller object | Use data.seller.name |
| Duplicate AP rows | Drive re-trigger | Move file after success; search Airtable by Invoice Number before create |
Test
- Drop one known invoice into Drive.
- Run the Zap (or wait for the trigger).
- Zap history: Custom Request → 200,
success: true. - Open Airtable: Status
Received, Total matches the PDF, Currency select populated. - 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.