Split a Multi-Invoice PDF and Extract Its Data Using PDF.co and Zapier

7 Minutes Read

This tutorial shows how to split a PDF containing multiple invoices, extract data from each invoice with PDF.co’s AI Invoice Parser, and add one row per invoice to Google Sheets.

Workflow

Google Drive → PDF.co Split PDF Based on Text Search → Looping by Zapier → PDF.co AI Invoice Parser → Google Sheets

This guide uses Google Sheets, but it can also be helpful for users of other apps like Xero and QuickBooks.

Step 1: Create the Google Drive Trigger

Create a new Zap and select Google Drive as the trigger app.

Choose New File in Folder, then:

  1. Connect your Google Drive account.
  2. Select the folder where combined invoice PDFs will be added.
  3. Test the trigger and select a sample PDF.

The sample should contain multiple invoices and a consistent phrase near the beginning of each invoice, such as Invoice Number.

Step 2: Split the PDF

Add an action and select PDF.co.

Choose Split PDF Based on Text Search, connect your PDF.co account, and configure:

  • Source File URL: Map the PDF file returned by Google Drive.
  • Text Search String: Enter the phrase that begins each invoice, such as Invoice Number.
  • Enable Case-Sensitive Search: No
  • Enable Regular Expression Search: No
  • Exclude Pages with Identified Text: No
  • OCR Language: Select the document language if the invoices are scanned.
  • File Name: Enter a base name for the split files.

Test the action. PDF.co should return a list of URLs—one for each invoice found in the source PDF.

For descriptions of each setting, see the PDF.co Split PDF by Text Search documentation.

Step 3: Loop Through the Split Invoices

Add Looping by Zapier and choose Create Loop From Line Items.

Under Values to Loop:

  1. Enter a name such as Invoice URL.
  2. Map the list of URLs returned by the PDF.co split action.
  3. Test the loop and confirm that the first iteration contains one invoice URL.

The actions placed after this step will run once for every split invoice.

Step 4: Extract the Invoice Data

Inside the loop, add another PDF.co action and select AI Invoice Parser.

Configure:

  • Source File URL: Map the current Invoice URL from the loop.
  • Message: Optionally describe the information you want extracted.
  • Custom Fields: Add any additional invoice fields required by your workflow.
  • Line Item Structure: Configure this if individual product or service rows are needed.

The standard output can include information such as:

  • Vendor name
  • Invoice number
  • Invoice date
  • Due date
  • Currency
  • Subtotal, tax, and total
  • Customer information
  • Line items

Test the action and confirm that the expected invoice fields are returned.

For descriptions of each setting, see the AI Invoice Parser documentation.

Step 5: Add Each Invoice to Google Sheets

Add Google Sheets after the AI Invoice Parser and select Create Spreadsheet Row.

Connect your Google account, then select the destination spreadsheet and worksheet.

Prepare columns such as:

Vendor | Invoice Number | Invoice Date | Due Date | Total | Currency | Invoice URL

Map each column to the corresponding AI Invoice Parser output. Map the loop’s invoice URL into the final column if you want to retain a link to the split PDF.

Test the action and confirm that one row is created for the current loop item.

Step 6: Publish the Zap

Test the complete workflow, then publish it.

When a combined invoice PDF is added to the selected Google Drive folder, Zapier will:

  1. Split it wherever the identifying text appears.
  2. Process each split invoice separately.
  3. Extract its data with the AI Invoice Parser.
  4. Add the results to Google Sheets.

In conclusion, this tutorial has shown you how to efficiently split a large PDF with multiple invoices into individual files using a specific keyword. By using the PDF.co API and the Zapier platform, you can easily extract invoice details and add them to a Google Spreadsheet. This automated process simplifies invoice management, enhances data accuracy, and saves time, allowing you to focus on more important business tasks.

Related Tutorials

See Related Tutorials