← Back to blog

Automate Invoice Processing from Gmail to Airtable

Make.com scenario: Gmail Watch Emails → Get Attachment → Cryvis Invoice API → Airtable Create Record for AP intake and status tracking.

What we're building

Vendors email invoices. Make watches a Gmail label, pulls the attachment, extracts fields with Cryvis, and creates an Airtable AP record with status Received. Ops reviews in Airtable instead of the inbox.

Gmail: Watch Emails (label: Invoices)
        |
        v
Gmail: Iterate Attachments  (or Get Attachment)
        |
        v
Filter: MIME is pdf / jpeg / png / webp
        |
        v
HTTP: POST /v1/documents/invoice
        |
        v
JSON: Parse JSON
        |
        v
Airtable: Create a Record
  status = Received
  + invoice header fields
  + Gmail message link / from address

What you need

  • Make.com + Gmail connection (mailbox that receives vendor invoices)
  • Gmail label Invoices (or filter rule that applies it)
  • Airtable base with an AP Inbox table (fields below)
  • Cryvis API key — Invoice API
  • A test email with a real invoice attachment

Credits: 1 per PDF page or image.

Create the scenario

  1. Gmail — Watch Emails (Trigger)
  2. Gmail — Iterate Attachments (or Download Attachment — names vary by Make version)
  3. Filter — attachment MIME / filename
  4. HTTP — Make a Request
  5. JSON — Parse JSON
  6. Airtable — Create a Record
  7. Optional: Gmail — Mark as Read or move to archive after success

Configure source

Watch Emails

  • Folder / label: Invoices
  • Criteria: only unread, or all — pick one and stick to it so you do not double-process
  • Attachments: yes — you need the binary

Get / Iterate Attachments

  • Map message ID from Watch Emails
  • Output each attachment as a bundle

Filter after attachments:

Filename ends with .pdf OR .png OR .jpg OR .jpeg OR .webp
AND Size > 0

Skip calendar invites, logos, and .eml wrappers. If one email has a PDF invoice and a PNG signature, the Filter keeps the PDF and drops the signature when you also require application/pdf or a size threshold.

Configure Cryvis HTTP

SettingValue
URLhttps://api.cryvis.com/v1/documents/invoice
MethodPOST
Body typeMultipart/form-data
Field fileAttachment binary
HeaderAuthorization: Bearer <API_KEY>

Same contract as extractInvoice: multipart field file, 1–20 files, MIME pdf/jpeg/png/webp.

Emails with image-only invoices (phone photos) work if the attachment is jpeg/png/webp. Forwarded inline images that are not attachments never reach this module — ask vendors to attach files.

Multipart checklist in Make

  1. Body type = Multipart/form-data (not raw or application/x-www-form-urlencoded).
  2. One part: name file, type File, value = attachment binary from Gmail.
  3. Header only: Authorization: Bearer <API_KEY> — no extra Content-Type.
  4. Method POST to https://api.cryvis.com/v1/documents/invoice.

When an email has multiple PDFs (invoice + packing list), the Iterator runs Cryvis once per attachment. That is correct for packing lists that are also invoices; wasteful for terms-and-conditions PDFs. Add a Filter on filename contains inv / invoice / vendor-known patterns if your vendors are consistent.

Process response

Map from data:

Airtable fieldCryvis path
Invoice Numberdata.invoice_number
Invoice Datedata.invoice_date
Due Datedata.due_date
Currencydata.currency
Vendor Namedata.seller.name
Vendor Tax IDdata.seller.tax_id
Buyer Namedata.buyer.name
Subtotaldata.subtotal
Tax Totaldata.tax_total
Total Amountdata.total_amount
Amount Duedata.amount_due
Statusstatic text Received
Source FromGmail From
Source SubjectGmail Subject
Source Message IDGmail message ID
Attachment Nameattachment filename
Received Atemail date

Keep line_items out of this table unless you use a linked Line Items table and an Iterator — covered in line items tutorial.

Configure destination

Airtable AP Inbox suggested fields:

  • Single line: Invoice Number, Vendor Name, Vendor Tax ID, Buyer Name, Currency, Attachment Name, Source From, Source Subject, Source Message ID
  • Date: Invoice Date, Due Date, Received At
  • Number / currency: Subtotal, Tax Total, Total Amount, Amount Due
  • Single select: Status — options Received, In Review, Approved, Paid, Rejected
  • Long text (optional): Raw JSON dump of data for audit

Create a Record: map columns as above; set Status to Received with a constant so humans update it later in Airtable views.

Filters and error handling

  1. Filter on data.success / HTTP OK before Create Record.
  2. Error Handler on HTTP: create an Airtable record in an AP Errors table with subject, attachment name, status code, body.
  3. Data Store key = seller.name + invoice_number. If exists → skip Create Record (or update Status only). Stops vendors who resend the same PDF.
  4. Missing invoice_number: still create the record, set Status to In Review, and flag a checkbox Needs Manual Number.

Test

  1. Apply label Invoices to one message with a known PDF.
  2. Run the scenario once.
  3. Confirm Airtable row: Status Received, totals match the PDF, From/Subject filled.
  4. Send a second email with a PNG logo only — Filter should stop before HTTP (no wasted credits).
  5. Resend the same invoice — Data Store should block the duplicate.

Field spot-checks

Open the PDF side-by-side with Airtable:

  • invoice_number matches the prominent invoice ID (not the PO unless you mapped PO separately — PO may appear as purchase_order_number when present).
  • due_date vs invoice_date order makes sense.
  • amount_due equals what finance would pay; if the PDF shows amount paid, still prefer amount_due for open AP.
  • seller.tax_id lands in Vendor Tax ID — blank is OK when the PDF omitted it; do not invent values.

If HTTP succeeds but Airtable rejects a number field, the cell often contains currency symbols or commas from a mistaken text map. Map numeric fields from Cryvis numbers, not reformatted strings.

Production considerations

  • Dedicated inbox or label only — never Watch All Mail.
  • Ops view in Airtable filtered to Status = Received, sorted by Due Date.
  • Credit burn: attachment storms (monthly statements with 40 pages) — consider a Filter on file size or page count if you add a pre-check.
  • Privacy: Airtable shares inherit base permissions; restrict who can export vendor tax IDs.
  • After Approve in Airtable, a second scenario can push to ERP — keep extraction and posting separate.

Next steps

Drive + Sheets version: Extract invoice data. Amount-based Slack alerts: Automate accounts payable. Vendor CRM sync: Extract vendor details.

Docs: extractInvoice · Invoice product · Make hub.