New: Markdown to PDF built for AI agents, PDF to E-Invoice for Factur-X/ZUGFeRD, and PDF to PDF/A for archive-ready PDF/A-3b.

Classify PDF Documents Using PDF.co and Zapier

5 Minutes Read

Automatically classify PDFs added to Google Drive and route them for processing. This example identifies ACME documents and extracts their data using a matching Document Parser template.

Step 1: Prepare the Classification Rules

Sign in to PDF.co and open the Document Classifier web tool.

Load a sample PDF and define keywords that identify the document category. For example:

ACME,AND,ACME,Invoice

This rule assigns the class ACME when both “ACME” and “Invoice” appear in the document. Use AND to require all keywords or OR to match any keyword.

Test matching and nonmatching documents, then copy the CSV rules into your Zap. See the classification rules documentation for details.

Step 2: Set Up the Google Drive Trigger

Create a Zap and select Google Drive → New File in Folder.

Connect your account, select the drive and incoming PDF folder, and test the trigger with a sample document.

Step 3: Configure PDF.co Document Classifier

Add PDF.co → Document Classifier. Connect your PDF.co account through the OAuth sign-in window.

Configure:

  • Source File URL: Map the File output from Google Drive.
  • Custom Classification Rules: Paste your tested CSV rules.
  • CSV Rules URL: Leave blank.
  • Enable Case Sensitive Custom Rules: Select No for this example.
  • Custom Profiles: Leave blank.

Test the action and confirm that the returned class includes ACME. Refer to the Document Classifier action documentation for settings.

Step 4: Route Documents with Paths

Add Paths by Zapier.

Create an ACME branch with a condition that checks whether the returned class contains ACME.

Create a Fallback branch for unmatched documents. Inside it, add Google Drive → Move File, map the original file ID, and select a separate review folder.

See the Zapier Paths guide for branching instructions.

Step 5: Extract Data from Matching Documents

Inside the ACME branch, add PDF.co → Document Parser.

Map the original Google Drive File output as the source PDF and enter your ACME extraction template’s ID in Template Id.

To create and test an extraction template, follow the Document Parser template guide.

Test the parser and review the extracted fields. Test both branches with appropriate sample files, then publish your Zap.

In this tutorial, you learned how to classify a PDF document using PDF.co and Zapier. You learned how to route documents that meet specific criteria. You also learned how to parse a PDF Invoice using the Document Parser.

Related Tutorials

See Related Tutorials