Skip to main content

Mail Merge template in Make

The Mail Merge family is a Make Generate Document Single option that fills a classic Word mail-merge template, using MERGEFIELD tags, with your data and outputs a PDF or Word document. It is the fastest path to migrate an existing Microsoft Word mail-merge letter into an automated, code-free Make scenario.

Related Blog Posts(4)
Google Docs Template + JSON? Make Turns Them Into PDFs or Word. Four Steps, Zero Code!
Generate PDF or Word from a Google Docs template in Make: Dropbox (template + JSON) → PDF4me Generate Document (Template File Type Google Docs) → Upload. Merge placeholders with data, no code. Step-by-step with screenshots.
Read post →
Word Template + JSON in Dropbox? Run a Mail Merge in Make. PDF or Word in Four Clicks!
Automate mail merge in Make: Dropbox (Word template + JSON) → PDF4me Generate Document (Template File Type Mail Merge) → Upload. Merge placeholders with data, output PDF or Word. Step-by-step with screenshots.
Read post →
New File in Your Dropbox Folder? Run a Mail Merge in Make. Six Steps, Fully Automated!
Trigger-based mail merge in Make: when a new file appears in Dropbox, find the JSON data, run PDF4me Generate Document (Mail Merge), then upload Word and PDF. Step-by-step with screenshots.
Read post →

Before You Start​

Word template with MERGEFIELD tags
The sample simple_mail_merge_template.docx uses standard Word mail-merge fields. Each merge field name maps to a key in your data file.
Matching data file
Use sample_mail_merge_data.json (recommended), test.xml, or test.csv. The merge field names match the data keys.
PDF4me connection in Make
Create a PDF4me connection in Make and paste your API key. The same key works across every PDF4me module in your scenario.

Sample File Pack​

Download the files below. One mail merge template plus matching data in JSON, XML, and CSV.

Make PDF4me Generate Document Single module. Connection is set to a PDF4me account. Template File Type is PDF4me Word Template. Output Type is Word. File source is Map with Template Name mapped from previous step File Name and Template mapped from previous step Data. Document DataType is Json and Document Data Text shows an inline JSON object with Name, Age, and Birth fields. Document Data File and Meta Data Json are empty.

Target configuration: Word mail-merge template + JSON in Document Data Text + PDF output.

What is the Mail Merge template template in Make?​

The Mail Merge family reads a Word .docx built with classic MERGEFIELD tags and replaces each field with a value from your data. Because it is a .docx, you select PDF4me Word Template as the Template File Type in Make. Choose this family when you are moving an existing Word mail-merge document into an automated flow.

How do I configure Mail Merge template in Make?​

Set the module fields as below. Required fields are marked with a red asterisk in the Make UI.

ParameterRequiredWhat it doesExample
ConnectionRequiredPDF4me connection for the scenario. Click Add to create one with your API key.My PDF4me connection
Template File TypeRequiredSet to Mail Merge for this template family. Options: PDF4me Word Template, Html, Mail Merge, Google Docs, Pdf Form. Defaults to PDF4me Word Template.Mail Merge
Output TypeConditionalFormat of the generated document. Options: Pdf, Word. Defaults to Pdf.Pdf
FileRequiredHow the template file reaches the module. The radio lists your connected storage actions (for example Dropbox - Download a File) and Map. Choose Map to wire the fields below from earlier modules: Template Name, Template and Document Data File only appear once Map is selected.Map
Template NameRequiredTemplate file name including extension. Map from the prior module file name output.simple_mail_merge_template.docx
TemplateRequiredTemplate file binary. Map from the prior module data output (for example 1. Data from Dropbox Download a File).1. Data
Document DataTypeRequiredFormat of the data payload. Options: Json, XML, Csv. Defaults to Json.Json
Document Data TextOptionalInline JSON or XML data. Use when Document Data File is empty.sample_mail_merge_data.json
Document Data FileOptionalMapped data file from a prior module. Use when Document Data Text is empty.1. Data
Meta Data JsonOptionalOptional JSON describing advanced field settings for the template.

Output​

The module returns one bundle per run. The generated file is placed on the Document output field. PDF4me may process the request as a background job, and Make waits for the result before the next module runs.

FieldTypeWhat it contains
File NameFile nameOutput filename based on Template Name with the extension matching Output Type.
DocumentFile (binary data)The generated document. Map into a downstream Upload File or Send Email Attachment module.

Production patterns​

Common Make patterns for mail merge templatesReplace the manual test with these once the sample works.
Template from cloud storage
  1. Dropbox or Google Drive stores simple_mail_merge_template.docx.
  2. Download a File loads the template as binary.
  3. Generate Document Single maps Template Name and Template.
  4. Data is built from Sheets or a webhook as JSON.
Webhook to delivered PDF
  1. Webhook receives the record payload.
  2. Generate Document Single merges it with the template.
  3. Output Type is PDF.
  4. Send Email or Upload File delivers Document.
Batch from a data source
  1. Search Records returns many rows.
  2. Iterator loops one record at a time.
  3. Generate Document Single runs once per record.
  4. Each file is uploaded to a per-record folder.

Frequently Asked Questions​

Which Template File Type do I pick for a mail-merge .docx?+
Select Mail Merge, the option provided for this template family. A mail-merge document is a .docx, so PDF4me Word Template also accepts it, and the screenshot above shows that generic route; the difference is that the fields are classic Word MERGEFIELD tags.
Can mail merge output PDF?+
Yes. Set Output Type to PDF for a locked file or Word for an editable one. The merge fields are replaced either way.
Do I need Microsoft Word to run this?+
No. Make and PDF4me perform the merge in the cloud. You only need Word if you want to edit the template file itself.
What data formats are supported?+
Set Document DataType to Json or Xml. The sample pack includes sample_mail_merge_data.json, test.xml, and test.csv.

For the underlying template engine, see the Aspose Words for .NET documentation and the Make data structures reference.