Skip to main content

Invoices, Contracts, Receipts—Same Inbox? Classify PDFs in Make and Route by Type

· 12 min read
SEO and Content Writer

You get a mix of PDFs—invoices, contracts, receipts—and you need them sorted by type so the right workflow handles each one. Doing that by hand doesn’t scale.

The fix: Define your classification rules on PDF4me.com (using regex or JavaScript expressions), then run the same classification inside Make: download a PDF (e.g. from Dropbox) → PDF4me Classify Document → use the returned Class Name to route or organize. Classification lives in your PDF4me account; Make just sends the file and gets back the class.

This guide has two parts. Part 1 is on PDF4me.com: where to go and how to set up your first class (e.g. pdf4me_invoice with a regex like invoice(.*)). Part 2 is on Make: a two-module scenario (Dropbox Download a File → PDF4me Classify Document) and how to read the result. All steps and screenshots are fact-checked from the PDF4me and Make UIs.

What You Need

  • A PDF4me accountSign in at PDF4me. Classification templates are created and stored in your account at Classify Document. You define expressions in regex or JavaScript (for AI-based classification, custom training can be arranged—contact PDF4me if needed).
  • A Make account — Create a free Make account if you don’t have one. Add the PDF4me integration on Make.com to use the Classify Document module.
  • A PDF4me API keyGet your PDF4me API key. In Make, use it to create a PDF4me connection. First time? See Connect PDF4me to Make.
  • A file source in Make — We use Dropbox – Download a File so the steps match our screenshots. You can use Google Drive, OneDrive, or any Make module that supplies a file (binary + file name). The flow stays the same: get the PDF → Classify Document → use Class Name in the next step.

Part 1: Set Up Classification on PDF4me.com

Classification is defined and stored on PDF4me.com. You create document classes and assign each class an expression (regex or JavaScript). When you call Classify Document from Make, PDF4me uses these templates to return a Class Name for the PDF you send. Do this part first so your Make scenario has something to run against.

Step 1: Open Classify Document on PDF4me

  1. Log in at PDF4me (dev.pdf4me.com).
  2. In the sidebar, click Classify Document. The page title is Classify Document and the subtitle is Classify your documents based on expressions.
PDF4me sidebar with Classify Document selected

Step 2: Create or Edit a Class

  1. On the Classify Document page, click the blue Edit button (with the pencil icon) to create a new classification template or modify an existing one.
  2. You’ll see the class definition area where you can add document classes and define how each is matched.
PDF4me Classify Document page with Edit button

Step 3: Define a Class Name and Expression

  1. Under Class Name, click the + (plus) button to add a new class if needed.
  2. In the class card:
    • Class Name — Give the class a name that will be returned by the API (e.g. pdf4me_invoice). This is the value you’ll see as Class Name in Make.
    • Choose expression type — Select Regular Expression or JavaScript depending on how you want to match the document content.
    • Regular Expression (if you chose regex) — Enter a pattern that identifies this document type. In our screenshot we use invoice(.*) to match documents containing the word “invoice” followed by any characters. Adjust the expression to match your own naming or content rules.
  3. Use Upload Template File to upload a sample PDF if you want to refine the template.
  4. Use Select Test File to pick a file, then click Test Classify to see which class it matches.
  5. Click Save Changes so the classes are saved to your PDF4me account. These are the templates that the Make Classify Document module will use.
PDF4me Classify Document: class pdf4me_invoice, expression type Regular Expression, regex invoice(.*), Upload Template File, Test Classify, Save Changes

Important: Classification on PDF4me uses expressions in regex or JavaScript. The guideline and UI are at Classify Document on PDF4me. For AI-based classification with custom training, PDF4me can schedule a call to help.


Part 2: Automate Classification in Make

Once your classes exist on PDF4me.com, you can run classification from Make: get a PDF from a previous module (e.g. Dropbox) and send it to PDF4me – Classify Document. The module returns Class Name (e.g. pdf4me_invoice), which you can use for routing, renaming, or further steps.

The Flow at a Glance

Your Make scenario has two modules:

  1. Dropbox – Download a File — Gets the PDF from a path you specify (e.g. /pdf4metest/ClassifyDocs/invoice_Pdf4me-202503-25041.pdf). Output: Data (file content), File Name, File Size.
  2. PDF4me – Classify Document — Sends that PDF to PDF4me using your saved classification templates. Output: Class Name (e.g. pdf4me_invoice). You use this in later modules to route or organize. Full details: Classify Document — Make.
Make scenario: Dropbox Download a File → PDF4me Classify Document

Step 1: Download a File (Dropbox)

Get the PDF into Make so the next module can send it to PDF4me.

Flow so far: Dropbox Download a File.

  1. Add DropboxDownload a File.
  2. Connection * — Choose your Dropbox connection (or Add a new one). For more information, see the online Help link in the dialog.
  3. Way of selecting files * — Choose Select a file to pick a specific path, or use Map a file path if you’re mapping from a trigger (e.g. Watch Files).
  4. File * — Enter or map the full path to your PDF. In our screenshot the path is /pdf4metest/ClassifyDocs/invoice_Pdf4me-202503-25041.pdf. Use the folder picker if available.
  5. Save. The module outputs Data (the PDF content), File Name, and File Size. You will pass this file to the PDF4me Classify Document module.
Make Dropbox Download a File: Connection, Way of selecting files, File path / pdf4metest / ClassifyDocs / invoice_Pdf4me-202503-25041.pdf

Step 2: Classify Document (PDF4me)

Send the downloaded PDF to PDF4me. Classification uses the templates you defined in Part 1 on PDF4me.com.

Flow so far: Dropbox Download a File → PDF4me Classify Document.

  1. Add PDF4meClassify Document (under Extract).
  2. Connection * — Choose your PDF4me connection (create one with your API key if needed). For more information, see the online Help link in the dialog.
  3. File — Select Dropbox - Download a File so the PDF content and file name come from the Download module you added in Step 1. (Alternatively use Map to map Document and File Name from a previous module.)
  4. Save and run the scenario. The module returns Class Name (e.g. pdf4me_invoice) based on your PDF4me classification templates. Execution uses 1 credit per operation.
Make PDF4me Classify Document: Connection, File from Dropbox - Download a File

Step 3: Use the Result

In the execution summary you’ll see INPUT (e.g. File Name: invoice_Pdf4me-202503-25041.pdf) and OUTPUT (Class Name: pdf4me_invoice). In later modules you can map Class Name to route the document (e.g. to different folders or workflows), rename files, or trigger type-specific actions.

Make execution: 1 operation, 1 credit; Input File Name invoice_Pdf4me-202503-25041.pdf; Output Class Name pdf4me_invoice

Why This Works

Key takeaways

  • Classification is defined on PDF4me.com. Go to Classify Document in the PDF4me sidebar, use Edit, and add classes with regex or JavaScript expressions. Save your changes so Make can use these templates.
  • Make only runs the classification. Download a PDF (e.g. from Dropbox) and pass it to PDF4me – Classify Document. The module returns Class Name (e.g. pdf4me_invoice) so you can route or organize in later steps.
  • One credit per classification. Each Classify Document operation uses 1 credit. Use the Class Name output in routers, renames, or follow-up modules.
  • For AI-based classification with custom training, PDF4me can help—reach out to schedule a call. For regex/JavaScript setup, use the Classify Document page and this guide.

Real-World Use Cases

Add classification templates in your PDF4me account, then use them in Make to route, rename, or trigger type-specific workflows. Here are common ways to put it to work:

Use case 1: Route invoices vs contracts to different folders

Problem: Mixed PDFs land in one Dropbox folder; invoices go to accounting, contracts go to legal. Manual sorting is slow.

Solution: Define classes on PDF4me (e.g. invoice, contract). In Make, add a Router after Classify Document: if Class Name = invoice, upload to /Accounting/Invoices/; if contract, upload to /Legal/Contracts/. Same flow, different destinations by type.

Template on PDF4me: Add classes invoice and contract with regex or JavaScript expressions. Trigger: Dropbox Watch Files, Download, Classify Document, Router, Upload (per branch).

Use case 2: Parse by document type (different templates per class)

Problem: Invoices need one parse template (invoice number, date, amount); receipts need another. You don’t know which template to use until you know the type.

Solution: Classify first, then parse. Add classes on PDF4me (e.g. invoice, receipt). In Make: Download, Classify Document, Router. For invoice, add Parse Document with the invoice template; for receipt, add Parse Document with the receipt template.

Template on PDF4me: Classes that match filenames or content. Make flow: Download, Classify, Router (by Class Name), Parse Document (per branch).

Use case 3: Rename files by class for search and filing

Problem: Generic filenames like document.pdf; you want to prefix the class so files are easy to search (e.g. invoice_document.pdf, contract_document.pdf).

Solution: Add classes on PDF4me, then in Make: Download, Classify Document, Upload a File. Set File Name to an expression using Class Name (e.g. class + underscore + original filename + .pdf). Map 2. Data from Download for the file content.

Template on PDF4me: Classes such as invoice, contract, receipt. Make flow: Download, Classify Document, Upload with dynamic File Name.

Use case 4: Mailroom automation—sort incoming documents

Problem: Documents arrive from email, scan, or shared drive; they need to be classified and filed by type (invoices, POs, receipts, forms) with no manual tagging.

Solution: Use a trigger (Watch Files, email attachment, webhook), Download, Classify Document. Add a Router: branch on Class Name and route each type to the right folder or next action (Parse Document, notify team, archive).

Template on PDF4me: Classes for each document type you receive. Use Test Classify with sample files to tune regex or JavaScript. Make flow: Trigger, Download, Classify Document, Router, per-type handling.

Next Steps

  1. Set up classes on PDF4me — Open Classify Document, click Edit, add a class (e.g. pdf4me_invoice) with a Regular Expression or JavaScript expression, then Save Changes.
  2. Get an API keyPDF4me API key dashboard. Use it in Make to create your PDF4me connection.
  3. New to Make + PDF4me?Connect PDF4me to Make shows how to create the connection. Add the PDF4me integration on Make.com.
  4. Build the scenario — Dropbox Download a File → PDF4me Classify Document. Map File to the Download module; use Class Name in the next module.
  5. Full module referenceClassify Document — Make for all parameters and output fields.