Classify Document in Make
What this module does
PDF4me — Classify Document reads a PDF and returns a Class Name that identifies what type of document it is — invoice, contract, receipt, or any custom class you define. Classification rules (regex or JavaScript expressions) are set up once in your PDF4me account at dev.pdf4me.com. When a PDF passes through the module in Make, it is matched against those rules and the winning class label is returned. Feed that label into a Make Router to send the document to the right folder, pick the correct parse template, or trigger a type-specific downstream action — all without any manual sorting.
Authenticating Your API Request
Every PDF4me module in Make requires a valid Connection. Create or select one that holds your PDF4me API key so the scenario can authenticate classification requests securely.
Important Facts You Should Not Miss
pdf4me_invoice) and a Regular Expression or JavaScript expression (e.g. invoice(.*)), then click Save Changes. The Make module has no fields for defining rules — it only applies the rules you saved in your account.
The module only needs File Name and Document from a prior download step. Classification rules are read from your PDF4me account automatically — no rule configuration inside Make.
Parameters
Prerequisite: Create at least one document class at dev.pdf4me.com → Classify Document before using this module. See Set Up Classify Document for the full walkthrough.
| Parameter | Required | What it does | Example |
|---|---|---|---|
| Connection | Yes | PDF4me API connection. Click Add and paste your API key if connecting for the first time. | My PDF4me connection |
| File Name | Yes | Filename of the PDF to classify including .pdf extension. Map from the prior module's file name output. | document.pdf |
| Document | Yes | Binary content of the PDF to classify. Map from the prior module's data output — Dropbox, Google Drive, HTTP, or email attachment. | 1. Data |
Output Fields
| Field | Description |
|---|---|
| Class Name | The matched class label (e.g. pdf4me_invoice, Contract). Use this in your Router or rename step. |
| Trace Id | Unique identifier for this classification run — useful for debugging or audit logging. |
Quick Setup
- Go to dev.pdf4me.com → Classify Document, click Edit, add a Class Name (e.g.
pdf4me_invoice) with a Regular Expression (e.g.invoice(.*)), and click Save Changes. - In your Make scenario, add PDF4me → Classify Document after a file download step.
- Select Connection (or click Add to create one with your PDF4me API key).
- Map File Name and Document from the prior download or trigger module.
- Click Save and run the scenario. The Class Name output contains the matched document type — connect it to a Router to branch by type, an upload module to save to a type-specific folder, or a rename step to prefix the filename with the class.
Workflow Examples
Workflow ExamplesCommon Make scenario patterns using Classify Document.
- Dropbox Watch Folder triggers when a new PDF lands in an "Incoming" folder.
- Dropbox Download a File retrieves the PDF binary.
- Classify Document returns Class Name — e.g.
pdf4me_invoice,pdf4me_contract, orpdf4me_receipt. - Router branches on Class Name: invoice →
/Accounting/Invoices/, contract →/Legal/Contracts/, receipt →/Finance/Receipts/. - Each branch uploads the PDF (from the download step, not Classify) to its target folder. Slack notifies the relevant team.
- Email Watch triggers when a PDF attachment arrives in the accounts inbox.
- Classify Document identifies whether it is an invoice, a purchase order, or a delivery note.
- Router branches on Class Name and runs the matching Parse Document module — invoice template for invoices, PO template for purchase orders.
- Extracted data (total, vendor, date) is written to a Google Sheet row for each document type.
- One scenario handles any document type — no manual sorting before processing.
- Google Drive Watch Files triggers when a new PDF is uploaded to a shared "Documents" folder.
- Google Drive Get a File downloads the binary.
- Classify Document returns the Class Name — e.g.
pdf4me_contract. - Google Drive Upload a File re-saves the PDF with a prefixed filename: Class Name + underscore + original name (e.g.
pdf4me_contract_NDA_2025.pdf). - The original unnamed file is moved to an archive subfolder for reference.