Split batched invoice PDFs into Airtable records

When someone drops a multi-invoice PDF into your Airtable intake table, automatically split it into one record per invoice in your accounting base.

Deterministic Code
AirtablePDF.coFinanceOperationsDocument ProcessingData Sync

Build a deterministic, code-based workflow that splits batched multi-invoice PDFs into one record per invoice in Airtable. No agent reasoning is needed; every step is fixed.

Trigger: Airtable poll on the 'new_record' event against a 'Batch Uploads' table in a base I will pick at setup. The operator drops a single PDF attachment into a row; that row firing the trigger is the start of the workflow.

Step 1. From the new Airtable record, read the first attachment URL on the PDF field (call the field 'Batch PDF' by default, but let me reconfigure it). Also capture the record id so we can back-link later, plus any pass-through columns I select (for example Supplier, Date Received, Uploaded By).

Step 2. Call PDF.co's 'Split PDF by Text Search or Barcode' operation with that attachment URL. Expose two configuration knobs at setup: (a) the delimiter type, either text search or barcode, and (b) the delimiter value, defaulting to the literal text 'Invoice #'. The result is an array of one PDF URL per detected invoice segment.

Step 3. Fan out over the returned segments. For each segment URL, create one record in a child 'Individual Invoices' table via Airtable's 'Create Records' operation. On each child record set the split PDF URL as an attachment field (default field name 'Invoice PDF'), link the record back to the parent batch row via a linked-record field (default name 'Batch'), and copy through any pass-through columns selected in Step 1. Batch the create calls in groups of ten because Airtable accepts up to ten records per create call.

Edge cases to handle deterministically: if PDF.co returns only one segment (no delimiter matches found), still create exactly one child row pointing at the original PDF so the batch is not silently dropped. If PDF.co returns an error, surface it on the batch row in a 'Status' or 'Error' field rather than failing the whole run silently.

Setup variables to expose: Airtable base id, Batch Uploads table id, Individual Invoices table id, Batch PDF attachment field name, Invoice PDF attachment field name, Batch back-link field name on the child table, optional pass-through field list, PDF.co delimiter type (text or barcode), and PDF.co delimiter value.

This is the 'code' workflow type because the pipeline is fully fixed: trigger, read URL, split, fan-out create. No model reasoning required.

Additional information

What does this prompt do?
  • Watches an Airtable intake table for a new batch PDF, the kind that comes in from a scanner or supplier portal with many invoices concatenated together.
  • Splits the batch into one PDF per invoice using a delimiter you choose, like the text 'Invoice #' or a QR barcode stamped on each page.
  • Creates one clean record per invoice in your Individual Invoices table, attaches the split PDF, and links it back to the original batch row.
  • Runs end to end with no manual sorting, no copy paste, and no risk of two invoices ending up on the same row.
What do I need to use this?
  • An Airtable base with two tables: a Batch Uploads table where operators drop the original multi-invoice PDF, and an Individual Invoices table where the split results land.
  • A PDF.co account for the splitting step. Free tier is enough to try it out.
  • A consistent way to tell one invoice from the next in the batch, either a repeating phrase like 'Invoice #' or a barcode stamped on the first page of each invoice.
How can I customize it?
  • Swap the delimiter. Use the literal text your invoices repeat, like 'Invoice Number' or 'Bill To', or point at a QR barcode if your upstream system stamps one.
  • Map extra columns. Carry the supplier name, upload date, or batch reference from the parent batch row onto each child invoice record.
  • Change the destination. Send the split invoices to a different table, or add a second step that also drops them into a folder in Google Drive or Dropbox.

Frequently asked questions

What if my batch PDFs do not have a repeating phrase like 'Invoice #'?
You have two options. Ask the upstream system to stamp a QR or barcode on the first page of each invoice and split on that, or pick any short text that consistently appears once per invoice, such as 'Bill To' or your own company name in the header.
How many invoices can be in one batch PDF?
There is no hard cap from the workflow itself. PDF.co handles long documents, and Airtable accepts the resulting records in groups of ten at a time, which the workflow handles for you.
Will the original batch PDF stay in Airtable?
Yes. The batch row in your Batch Uploads table is untouched. Each split invoice becomes a new record in your Individual Invoices table with a link back to the batch it came from, so you always have an audit trail.
Can the split invoices include extra fields from the batch row?
Yes. When you set up the workflow you can carry over any column from the batch record, such as supplier, date received, or the operator who uploaded it, onto each child invoice record.
What happens if PDF.co cannot find the delimiter?
If the splitter finds no match it returns the original PDF as a single segment. You can spot these in Airtable because the batch produces only one child record, and review them by hand.

Stop hand sorting invoice batches.

Connect Airtable and PDF.co once, drop a batch PDF in the intake table, and every invoice lands as its own row in seconds.