Skip to main content

Generate Multiple Documents - Batch Creator for Zapier

PDF4me Generate Documents Multiple is a Zapier action that merges one template with a JSON or XML array, producing one personalized document per array item in a single run. Use it for batch contracts, invoices, certificates, or letters. Returns an array of documents for the next Zap step or a loop.

What this action does

Takes one Word, HTML, PDF, Mail Merge, or GoogleDocs template and a data array where each object represents one document's field values, then runs the same merge once per array item. The result is an array of generated documents sharing the same template and output format, ready to loop through with Looping by Zapier for per-document actions like emailing or archiving.

Related Blog Posts(1)

Authenticating Your API Request

To access the PDF4me Web API through Zapier, every request must include proper authentication credentials. Authentication ensures secure communication and validates your identity as an authorized user, enabling seamless integration between your Zapier workflows and PDF4me's batch document generation services.

Important Facts You Should Not Miss

The output is an array, not a single file
Use Looping by Zapier after this step to process each generated document one at a time.
Input Data Format Type decides which data field is required
Set it to Text and Data Text becomes required for an inline JSON/XML array. Set it to File and Data File becomes required instead, for an array data file mapped from a previous step.
Every document in the batch shares the same template and output format
Template File Type and Output Document Type apply once per run, not per array item. Only the field values from each array object differ between documents.
PDF4me Generate Document in Zapier action panel showing Template File, Template File Name, Template File Type set to PDF, Input Data Format Type set to Text, Data Text, Input Data Type set to Json, and Meta Data
Set up action panel: only Template File, Template File Type, Input Data Format Type, and Input Data Type are required; Data Text becomes required once Input Data Format Type is Text.

What Are the Key Features of Generate Documents Multiple?

  • Batch Document Generation: create one document per array item from a single template in one operation
  • Multi-Format Template Support: Word, HTML, PDF, Mail Merge, and GoogleDocs templates
  • Array Data Input: JSON or XML array, supplied as inline text or a mapped file
  • Configurable Output: choose Output Document Type for the whole batch (Pdf, Docx, and other supported formats)

Parameters

Complete list of parameters for the Generate Documents Multiple action. Parameter names match the Zapier configuration UI shown in the screenshot above.

Quick setup checklist
  1. Map Template File and set Template File Type to match it
  2. Set Input Data Format Type to Text or File, then fill Data Text or Data File with a JSON/XML array (one object per document)
  3. Set Input Data Type to match the array format, and optionally set Output Document Type
ParameterRequiredWhat it doesExample
Template FileRequiredTemplate file for generating documents. Supports Word (.docx), HTML, PDF, Mail Merge, or GoogleDocs templates.contract_template.docx
Template File NameConditionalName for the output files. If not provided, the name is picked from Template File.contract_template
Template File TypeRequiredFormat of the template: Word, HTML, PDF, Mail Merge, or GoogleDocs.Word
Input Data Format TypeRequiredWhether the data array is supplied as inline text or a file. Text reveals Data Text. File reveals Data File.Text
Data TextConditionalInline JSON or XML array, one object per document to generate. Required when Input Data Format Type is Text.[{"firstname":"John"},{"firstname":"Jane"}]
Data FileConditionalArray data file (JSON or XML) mapped from a previous step. Required when Input Data Format Type is File.customers_data.json
Input Data TypeRequiredStructure of the supplied array, must match Data Text or Data File exactly.Json
Output Document TypeConditionalFormat applied to every generated document in the batch: Pdf, Docx, and other supported formats.Pdf
Meta DataConditionalMetadata to attach to template fields during generation.-

Important: 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, and Meta Data are optional.

What Does Generate Documents Multiple Return?

The PDF4me Generate Documents Multiple action returns an array of generated documents, one entry per item in the input data array.

FieldTypeWhat it contains
File NameStringFile name of each generated document, without extension.
File ExtensionStringExtension of each output document, matching Output Document Type.
Full File NameStringComplete filename including extension for each document.
File URLStringDirect URL to each generated document.
File SizeNumberSize of each generated document in bytes.

Note: The output is an array of documents, one per input array item. Add Looping by Zapier after this step to iterate through each generated document.

Example JSON response (array of documents):

[
{
"File Name": "document_001",
"File Extension": ".pdf",
"Full File Name": "document_001.pdf",
"File URL": "https://...",
"File Size": 125440
},
{
"File Name": "document_002",
"File Extension": ".pdf",
"Full File Name": "document_002.pdf",
"File URL": "https://...",
"File Size": 127680
}
]

Typical Setups

Workflow ExamplesCommon Zapier workflow patterns using Generate Documents Multiple.
Batch contract generation
  1. A trigger fires when a batch of client records is ready for contract generation.
  2. A Formatter step builds a JSON array with one object per client's contract variables.
  3. PDF4me Generate Documents Multiple maps the contract template and the array into Data Text, with Output Document Type set to Pdf.
  4. Looping by Zapier iterates the returned array and emails each client their own contract.
Mass invoice run
  1. A billing-cycle trigger fires at the end of the period.
  2. An accounting or e-commerce step exports each customer's invoice data as one array item.
  3. PDF4me Generate Documents Multiple runs the invoice template against the array, producing one PDF per customer.
  4. Looping by Zapier attaches each invoice to an email step addressed to that customer.
Certificate batch for a course cohort
  1. A trigger fires when a training program marks a cohort as complete.
  2. The array is built from each participant's name and completion date.
  3. PDF4me Generate Documents Multiple runs a certificate template with Template File Type Mail Merge against the array.
  4. Looping by Zapier stores each certificate in a learning-management or archive step.

Practical Tips

The output is an array, plan for a loop
Map "File URL" through Looping by Zapier rather than expecting a single downloadable file directly from this step.
Only one of Data Text or Data File is required
Set Input Data Format Type first, it determines which of the two fields becomes required and hides the other.
Input Data Type must match your actual array format
Selecting Json for an XML array, or the reverse, causes the template engine to fail to bind fields correctly across the whole batch.
Output Document Type applies to the whole batch
You cannot mix output formats within one run, every document in the array uses the same Output Document Type.
Large arrays mean more Zap tasks
Each generated document and each loop iteration counts toward your Zapier task usage, factor batch size into plan limits.

Cheat Sheet

FieldValue
ActionGenerate Documents Multiple
Template File[Mapped from previous step]
Template File TypeWord / HTML / PDF / Mail Merge / GoogleDocs
Input Data Format TypeText (or File)
Data Text[{"firstname":"John"},{"firstname":"Jane"}]
Input Data TypeJson
Output Document TypePdf

Common Questions

How do I generate multiple documents from one template in Zapier?+
Add the PDF4me Generate Documents Multiple action to a Zap, map a Template File and set Template File Type, then provide a JSON or XML array with one object per document in Data Text or Data File. The action returns one generated document per array item.
What is the difference between Generate Documents Multiple and Generate Document Single?+
Generate Document Single merges a template with one JSON or XML object and returns one document. Generate Documents Multiple merges the same template with an array of objects and returns an array of documents, one per array item. See Generate Document Single for the one-document version.
How do I process each generated document separately?+
The action returns an array, not a single file. Add Looping by Zapier after this step to iterate through the array and run one or more actions, such as sending an email or uploading a file, once per generated document.
Do I need to supply Data Text or Data File?+
Only one, depending on Input Data Format Type. Set it to Text to make Data Text required for an inline JSON or XML array, or to File to make Data File required for an array data file mapped from a previous step.
Can I control the output format of the generated documents?+
Yes. Output Document Type sets the format, such as Pdf or Docx, applied to every document in the batch. All documents in one run share the same output format.

Same Task on Other Platforms

Industry Use Cases & Applications

  • Bulk Contract Generation: create multiple personalized contracts for client onboarding
  • Legal Notice Distribution: generate customized legal notices for multiple recipients
  • Agreement Processing: automate mass agreement creation with client-specific terms
  • Document Automation: streamline legal document workflows with batch processing

Get Help