How to Classify Documents using PDF.co and Zapier

In this tutorial, we will show you how to classify a document and parse it using PDF.co and Zapier. We will use this sample PDF Invoice to identify whether it comes from ACME or another company.

  1. Select a New File Trigger
  2. Set Up Trigger
  3. Test Trigger
  4. File Found
  5. PDF.co Document Classifier
  6. Setup Document Classifier
  7. Test Document Classifier
  8. Document Classifier Result
  9. Add Path
  10. Rename Path A
  11. Set Up Rules
  12. Test Rules
  13. PDF.co Document Parser
  14. Set Up Document Parser
  15. Setup Document Parser
  16. Test Document Parser
PDF Invoice To Classify
PDF Invoice to Classify

Step 1 – Google Drive New File Trigger

First, let’s set up our trigger. Let’s choose Google Drive as the App and the New File in Folder as the Trigger Event.

Google Drive New File In Folder Trigger

Step 2 – Set up Trigger

Let’s set up the trigger.

  • In the Drive field, select the My Google Drive.
  • In the Folder field, choose the folder where your file is stored.

Setup Trigger

Step 3 – Test Trigger

Now let’s test the trigger.

Test Google Drive Trigger

Step 4 – File Found

Great! Google Drive returned the PDF Invoice that we want to test with the PDF.co Document Classifier.

Google Drive Returned PDF File

Step 5 – PDF.co Document Classifier

Let’s add a PDF.co action step and choose the Document Classifier as its event.

Add PDF.co Document Classifier Step

Step 6 – Setup Document Classifier

Let’s configure the Document Classifier.

  • In the Input field, select the PDF Invoice from Google Drive.
  • In the Classification Rules CSV field, enter the rules based on keywords in identifying a document.

Configure Document Classifier

The easiest way to set up the rules is through the Classifier Test Tool. It is available in the PDF Multitool here. For more information, check out the PDF Classifier page here.

Classifier Test Tool
Classifier Test Tool

Step 7 – Test Document Classifier

Now let’s test the Document Classifier.

Test Document Classifier Setup

Step 8 – Document Classifier Result

Great! PDF.co returned the Class that matched the PDF Invoice.

Document Classifier Result

Step 9 – Add Path

Let’s add another step and use the Zapier Path.

Add Zapier Path

Step 10 – Rename Path A

Let’s rename Path A and call it ACME.

Rename Path A

Step 11 – Setup Rules

Let’s set up this Path to only continue when the Class result from Document Classifier contains the word ACME.

Setup Path Rules

Step 12 – Test Rules

All ACME PDF Invoices will now pass through this Path.

Success Path Test

Step 13 – PDF.co Document Parser

Inside the ACME Path, let’s add the PDF.co Document Parser step to parse our sample ACME PDF Invoice.

Add PDF.co Document Parser

Step 14 – Setup Document Parser

Let’s configure the Document Parser.

  • In the Input field, select the PDF Invoice link from Google Drive.
  • In the Template Id field, enter the Document Parser Template Id we created specifically for this file. For more information about Document Parser Template creation, check out this page.

Configure Document Parser

Step 15 – Test Document Parser

Let’s send our Document Parser data to PDF.co to test.

Test Document Parser

Step 16 – Parsed PDF Output

Here’s the parsed text from the ACME PDF Invoice.

Parsed PDF Output
Parsed PDF Output

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.