Generate Document Single in Zapier
Generate Document Single is a Zapier action by PDF4me that merges a Word, HTML, Mail Merge, or Google Docs template with JSON or XML data to produce one completed document. Use it to turn CRM records into contracts, order data into invoices, or form submissions into certificates, all inside a Zap.
What this action does
PDF4me Generate Document Single takes one template file and one set of data and returns one merged document, inside a Zap. Map a Word, HTML, PDF, Mail Merge, or Google Docs template, supply data as inline text or a data file, and choose the output format. Ideal for contract generation, invoice creation, certificate issuance, offer letters, and any workflow that turns one record into one document without writing merge code.
Authenticating Your API Request
To access the PDF4me Web API, every request must include proper authentication credentials. Connect your PDF4me account once in Zapier and every Generate Document Single step in your Zaps reuses it.
Important Facts You Should Not Miss
Text and Data Text becomes the required field for inline JSON/XML. Set it to File and Data File becomes required instead, for a data file mapped from a previous step. The other field stays hidden until you switch the toggle.Mail Merge (a Word template built for mail-merge fields) and GoogleDocs (a Google Docs export used as a merge template), confirmed in live Zap configurations. Match this value to how the template file was actually built.Pdf then Docx) to produce both a locked copy and an editable copy from a single trigger..png)
Set up action panel with Input Data Format Type set to Text, revealing the Data Text field
Parameters
Required in the Zapier UI: Template File, Template File Type, Input Data Format Type, Input Data Type, and (depending on Input Data Format Type) either Data Text or Data File. Template File Name, Output Document Type, Keep Pdf Editable, and Meta Data are optional.
| Parameter | Required | What it does | Example |
|---|---|---|---|
| Template File | Required | Template file to populate. Map it from a previous step (Dropbox, Google Drive, Upload File). | template.docx |
| Template File Name | Optional | Name for the output file. If left blank, the name is picked from Template File's own filename. | contract_template |
| Template File Type | Required | Format of the template: Word, HTML, PDF, Mail Merge (Word built for mail-merge fields), or GoogleDocs (Google Docs export). | Mail Merge |
| Input Data Format Type | Required | Whether data is supplied as inline text or a file. Text reveals Data Text. File reveals Data File. | Text |
| Data Text | Conditional | Inline JSON or XML string to merge into the template. Required when Input Data Format Type is Text. | [{"firstname":"John","lastname":"Adams"}] |
| Data File | Conditional | Data file (JSON or XML) mapped from a previous step. Required when Input Data Format Type is File. | data.json |
| Input Data Type | Required | Structure of the supplied data, must match Data Text or Data File exactly. | Json |
| Output Document Type | Optional | Format of the generated document: Pdf, Docx, and other supported formats. | Pdf |
| Keep Pdf Editable | Optional | When the output is a PDF from a fillable template, keeps its form fields interactive instead of flattening them. | false |
| Meta Data | Optional | Metadata to attach to template fields during generation. | - |
Output
| Field | Type | What it contains |
|---|---|---|
File Name | String | File name of the generated document, without extension. |
File Extension | String | Extension of the output document, matching Output Document Type. |
Full File Name | String | Complete filename including extension. |
File URL | String | Direct URL to the generated document, map this into an Upload File, email, or storage step. |
File Size | Number | Size of the generated document in bytes. |
How Do I Set Up Generate Document Single in Zapier?
- Add PDF4me as the action app in your Zap and choose Generate Document.
- Connect your PDF4me account or select an existing connection.
- Map Template File from a previous step and set Template File Type to match it (Word, HTML, PDF, Mail Merge, or GoogleDocs).
- Set Input Data Format Type to Text and fill Data Text with inline JSON/XML, or set it to File and map Data File from a previous step.
- Set Input Data Type to Json or Xml to match your data's actual format.
- Optionally set Output Document Type and Keep Pdf Editable, then test the step.
- Map the returned File URL into an Upload File, Gmail, or storage action to deliver the generated document.
Typical Setups
Workflow ExamplesCommon Zapier patterns using Generate Document Single.
- A new file lands in a watched Dropbox folder (the Word template).
- A Find a File step locates the matching JSON data file in the same folder.
- Generate Document Single runs with Template File Type Mail Merge, Input Data Format Type File, Data File from the find step, Input Data Type Json.
- An Upload File step saves the generated document back to Dropbox.
- A Find a File step locates a Google Docs template exported as .docx.
- Generate Document Single runs with Template File Type GoogleDocs, Input Data Format Type Text, Data Text as an inline JSON array, Output Document Type Pdf.
- A second Generate Document Single step reuses the same template with Input Data Format Type File and Output Document Type Docx, producing an editable copy alongside the PDF.
- A Webhooks by Zapier trigger receives a new-deal payload from a CRM.
- A Formatter step shapes the payload into the JSON structure the contract template expects.
- Generate Document Single runs with Template File Type Word, Input Data Format Type Text, Data Text from the Formatter step, Input Data Type Json, Output Document Type Pdf.
- A Gmail step emails the generated contract to the client.
- A course-completion trigger fires from a learning-management webhook.
- Generate Document Single runs with Template File Type HTML, Input Data Format Type Text, Data Text holding the learner name, course, and date, Output Document Type Pdf.
- An Upload File step saves the certificate to a shared drive folder for the learner.
Practical Tips
Cheat Sheet
| Field | Value |
|---|---|
| Action | Generate Document |
| Template File | From a previous step |
| Template File Type | Word / HTML / PDF / Mail Merge / GoogleDocs |
| Input Data Format Type | Text or File |
| Data Text | Required when Input Data Format Type is Text |
| Data File | Required when Input Data Format Type is File |
| Input Data Type | Json or Xml |
| Output Document Type | Pdf, Docx, and other supported formats |
| Keep Pdf Editable | false (default behavior in documented workflows) |
What Should I Use Instead of Generate Document Single?
If your workflow needs many personalized documents from one template and a list of records in a single run, rather than one document per Zap run, use Generate Documents Multiple. If your template is a fillable PDF form rather than a mustache/merge-field template, use Fill a PDF Form to populate its AcroForm fields directly instead of running it through the template engine.
Common Questions
Related Actions
Same Task on Other Platforms
Industry Use Cases & Applications
- Legal & Professional Services
- Finance & Accounting
- Human Resources
- Education & Training
- Contract Generation: Create personalized contracts from templates with client data
- Legal Document Creation: Generate legal documents with case-specific information
- Agreement Processing: Automate agreement creation with dynamic data integration
- Document Automation: Streamline legal document workflows with template processing
- Invoice Generation: Create professional invoices from templates with transaction data
- Financial Reports: Generate financial statements and reports with automated data
- Statement Generation: Create account statements with customer-specific information
- Billing Documents: Automate billing document creation with service data
- Offer Letters: Generate personalized offer letters from templates with candidate data
- Employee Documents: Create employee handbooks and policies with company data
- Certificate Generation: Generate training certificates and achievement documents
- Onboarding Materials: Create personalized onboarding documents for new hires
- Certificate Issuance: Generate certificates with student achievement data
- Report Cards: Create personalized report cards with academic performance data
- Course Materials: Generate customized course materials with student information
- Assessment Documents: Create personalized assessment documents and feedback