Skip to main content

Parse a Document in Make

What this module does

PDF4me Parse a Document runs your saved parse template against a PDF inside a Make scenario and returns the extracted fields ready to map into the next module. Pipe File Content from Dropbox, Google Drive, OneDrive, or HTTP, reference the template by Template Name (TemplateId), and route the parsed values straight into Airtable, Google Sheets, a database, or a downstream email. The template carries the extraction logic, so one module call covers invoices, contracts, receipts, and any custom layout you have configured.

Related Blog Posts(1)

Before you run this module: create a parse template in the PDF4me dashboard. Define your capture keys and pick Regex Expression for stable patterns or JavaScript Expression for conditional logic. The Make module references that template by TemplateId. See Prepare Parse Info for Document for full setup, Regex examples (INV-\d{6,10}, \d{2}/\d{2}/\d{4}), and two working JavaScript Expression classifier samples.

Authenticating Your API Request

The PDF4me module in Make requires a valid Connection. Create or select one that holds your PDF4me API key so the scenario can authenticate parse requests securely.

Important Facts You Should Not Miss

Template Name accepts the TemplateId GUID
Despite the field label, paste the GUID TemplateId from the dashboard rather than the human-readable template name. The GUID is stable across renames and is the safe choice for production scenarios.
Regex for stable patterns, JavaScript for conditional logic
Capture rules live in the template. Use Regex Expression for invoice numbers, dates, amounts, tax IDs. Use JavaScript Expression with the text variable for classification and fallback rules.
One parse template, every platform
The same TemplateId works in Make, n8n, Zapier, Power Automate, and direct REST calls. Build the template once, reuse it everywhere your team automates.
Parse a Document module in Make

Parameters

ParameterRequiredWhat it doesExample
ConnectionYesPDF4me connection that authenticates the module. Click Add to create one with your API key, or pick an existing connection from the dropdown.PDF4me production
File ContentYesBinary PDF mapped from a previous module: Dropbox Download a File, Google Drive Get a File, OneDrive Download a File, HTTP Get a File, Gmail Get an Attachment, or any module that returns a file.1. Data
File NameYesSource filename including .pdf extension. Usually mapped from the same upstream module File Name output.1. File Name
Template NameYesTemplateId GUID from the PDF4me dashboard. Identifies which parse template (capture keys + extraction rules) the module should apply.12345678-1234-1234-1234-123456789abc

Expression types in your parse template

Regex ExpressionStable patterns
Invoice numbers (INV-\d{6,10}), dates (\d{2}/\d{2}/\d{4}), amounts ($?\d{1,3}(?:,\d{3})*(?:.\d{2})?). Around 80% of production capture keys.
JavaScript ExpressionConditional logic and classifiers
The capture area text is passed as text; return a string. Multi-marker classification, fallback rules, date normalization. See Prepare Parse Info for Document for two working samples.

Output

The module returns one Bundle per execution with the trace identifier plus the parsed key/value data ready to map into the next module.

FieldWhat it contains
Trace-IdUnique identifier for the parse operation. Useful for audit logs and error troubleshooting.
Parsed fieldsOne field per capture key defined in the template (for example invoiceNumber, totalAmount, invoiceDate). Pick them directly in the visual mapper of any downstream module.

Scenario examples

Common Make scenario patternsTypical ways to chain Parse a Document into a Make flow.
Email invoice to Airtable
  1. Gmail Watch Emails fires on new vendor invoices.
  2. Iterator loops over each PDF attachment.
  3. Parse a Document runs the Invoice template against the binary attachment.
  4. Airtable Create a Record writes invoiceNumber, totalAmount, invoiceDate into the AP table.
Dropbox receipts to Google Sheets
  1. Dropbox Watch Files fires on new uploads in /receipts.
  2. Dropbox Download a File loads each PDF binary.
  3. Parse a Document extracts vendor, date, items, total using the Receipt template.
  4. Google Sheets Add a Row appends the parsed values to the expense tracker.
Classifier + router scenario
  1. HTTP Webhook receives an inbound PDF.
  2. Parse a Document runs a template with a JavaScript Expression key returning the document type.
  3. Router branches on the type field (invoice / order / receipt) to a type-specific downstream branch.
  4. Each branch posts the parsed values to its destination system.

Frequently Asked Questions

What goes in the Template Name field?+
Paste the TemplateId GUID from the PDF4me dashboard. Despite the field label, the GUID is the safer production value. It is stable across renames and identical to the value used by the REST API and the other platform connectors.
Where does the file content come from?+
Any upstream module that returns a binary file works: Dropbox Download a File, Google Drive Get a File, OneDrive Download a File, HTTP Get a File, Gmail Get an Attachment. Map both File Content and File Name from the same upstream step.
Do I have to build a template, or can the module parse any PDF?+
Template-based parsing is the supported production mode. Build the template once in the dashboard, then reference its TemplateId. The same TemplateId also works in n8n, Zapier, Power Automate, and direct REST calls.
Can I classify documents at parse time using JavaScript?+
Yes. Inside the template add a JavaScript Expression on a capture key. The capture area text is passed as the variable text and your function returns a string. Use it for invoice vs order vs receipt classification or to normalize date and amount formats.
Where do the parsed field values show up in the next module?+
In the visual mapper they appear as individual fields on the Parse a Document module output bundle, named to match your template capture keys (camelCase). Pick them like any other Make data mapping.
What if my PDF has multiple layouts (different invoice senders)?+
Use a JavaScript Expression key to detect the layout marker, then build one capture template per layout and select the right TemplateId with a Router. Or use Set Up Classify Document upstream to pre-route, then call Parse a Document with the matching template.

Same task on other platforms

Get Help