Generate Document Single in Make
What this module does
PDF4me Generate Document Single merges a Word, HTML, or PDF template with JSON or XML data and produces a personalized PDF, Word, Excel, or HTML file in one Make module. It replaces multi-step mail-merge scenarios with a single configurable action. Map the template file from any cloud storage module (Dropbox, Google Drive, OneDrive), supply your data inline or as a mapped file, and pipe the generated Doc Data output straight into Upload File, Send Email, or any downstream Make module.
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 document generation requests securely.
Important Facts You Should Not Miss
.docx file mapped with HTML selected as the type fails at run time. Word templates use mustache style placeholders such as {{customer.name}}.Doc Data output field. Pipe it directly into Upload File (Dropbox, Drive, OneDrive), Send Email Attachment, or any downstream module that accepts binary. The filename is preserved from the Template Name field.
Generate Document Single module configuration in Make. Required fields (red asterisk): Connection, Template File Type, Output Type, Template Name, Template, and Document DataType. With File Selection set to Map, wire Template Name and Template from the prior module; supply data via Document Data Text or Document Data File.
Parameters
Required in the Make UI: Connection, Template File Type, Output Type, Template Name, Template, and Document DataType (all marked with red asterisks in the module). Conditional: Document Data Text OR Document Data File (one of the two must carry the data payload). Optional: Meta Data Json.
| Parameter | Required | What it does | Example |
|---|---|---|---|
| Connection | Yes | PDF4me connection for the scenario. Click Add to create a connection with your API key, or select an existing connection from the dropdown. | test prod account |
| Template File Type | Yes | Select template file type. PDF4me Word Template for .docx (mustache variables), PDF4me HTML Template for .html, PDF4me PDF Template for .pdf (form field replacement). | PDF4me Word Template |
| Output Type | Yes | Format of the generated document. Word for editable .docx, PDF for print ready locked layout (most common), Excel for .xlsx, HTML for web embedding. | Word |
| File Selection | Yes | How the template file is supplied. Choose a storage module shortcut (for example Dropbox Download a File) or select Map to wire Template Name and Template from any prior step. | Map |
| Template Name | Yes | Template file name including extension. Map from the previous module filename output (shown as 1. File Name when Dropbox Download a File is upstream). | 1. File Name |
| Template | Yes | Template file binary for document generation. Map from the previous module data output (shown as 1. Data when Dropbox Download a File is upstream). | 1. Data |
| Document Data File | Conditional | Map source document file content from a previous action when your data payload is a file rather than inline text. Use when Document Data Text is empty. | |
| Document DataType | Yes | Choose document data type. Json for JSON payloads (most common), Xml when the upstream system returns XML. | Json |
| Document Data Text | Conditional | Input data text to generate the document. Paste JSON or XML inline or build it with Make expressions. Use when Document Data File is empty. | { "Name": "John" , "Age": 16 , "Birth": "2000-1-1" } |
| Meta Data Json | No | Optional metadata for template fields (title, author, subject, custom properties). Shown without an asterisk in the Make UI. Leave empty for most templates. | |
Template File Type options
Match the type to the extension of the file mapped under Template.
PDF4me Word Template.docx with mustache placeholders{{customer.name}}, loops, conditionals, tables, and inline images. Best for invoices, contracts, certificates, and letters.PDF4me HTML Template.html with inline CSSPDF4me PDF TemplateFillable PDF form field replacementOutput Type options
Pick the format that matches what downstream Make modules expect.
PDFPrint ready, locked layoutWordEditable .docx outputExcelSpreadsheet .xlsx outputHTMLWeb ready HTMLDocument DataType options
Pick the data format produced by your upstream system.
JsonMost common in MakeXmlFor XML native systemsOutput
The module returns one Bundle per execution. The generated file is placed on the Doc Data output field, ready for downstream modules to pick up via the standard Make data mapping.
| Field | Type | What it contains |
|---|---|---|
Doc Data | Binary | The generated document in the format chosen under Output Type. Map this into a downstream Upload File, Send Email Attachment, or any module that accepts binary input. |
File Name | String | Output filename based on Template Name with the extension matching Output Type. |
Mime Type | String | MIME type of the generated document (application/pdf, application/vnd.openxmlformats-officedocument.wordprocessingml.document, etc). |
Scenario examples
Common Make scenario patternsTypical ways to chain Generate Document Single into a Make flow.
- Webhook receives JSON for a new invoice.
- Dropbox Download a File loads the invoice Word template.
- Generate Document Single maps Template Name and Template from the Dropbox step, sets DataType to Json, and reads the webhook JSON into Document Data Text.
- Email Send Email attaches Doc Data to send the invoice to the customer.
- Scheduled trigger fires daily at 09:00.
- Airtable Search Records fetches new course completions.
- Iterator loops over each record.
- Generate Document Single merges the Word certificate template with the record data and outputs PDF.
- Google Drive Upload a File saves each certificate to a shared folder named after the recipient.
- Schedule fires on the first of every month.
- Google Sheets Search Rows pulls the monthly aggregation data.
- Transform module shapes the rows into the JSON structure the template expects.
- Generate Document Single renders the report template with the data, Output Type PDF.
- OneDrive Upload a File archives the PDF and Slack Send a Message posts a download link.