Free plan
Mail Merge
Fill one Word letter with many names to make many copies
About this tool
Mail merge fills a template, which is a document with gaps like {{name}}, with real values. You add a Word or OpenDocument template and your list of people as a table file, or type one set of values. You get one finished document for each row. Each gap in the template needs a matching column name.
For example, you have a letter that says Dear {{name}} and a list of 50 customers, and you get 50 personal letters.
How to use it
- Choose this tool.
- Add your template file with the gaps written like {{name}}.
- Add your list as a data file such as CSV or Excel, or type the values for one letter.
- Choose the type of result, such as Word or PDF.
- Press Generate.
What you get back
You get the finished letters to download, one per row of your list. You can choose to stop if a gap has no value.
GOOD TO KNOW
Each generated document counts as one file.
TEST IT LIVE
Try Mail Merge in the Studio
One click opens the Studio with this tool already selected. Add your file and see the result in seconds.
Family
Documents
Plan
Free
Method
POST
Endpoint
/v1/documents/mail-merge
Tool ID
documents.mail-merge
Authentication
API key
Accepts
Text and settings
Background jobs
Yes
Usage group
Documents
For developers
Use it from your code
cURL
curl -X POST "https://app.h2i.davixlabs.io/v1/documents/mail-merge" \
-H "X-Api-Key: $DAVIX_H2I_API_KEY" \
-F 'to=docx' \
-F 'response=url' \
-F 'output_bundle=zip'Node.js
const { DavixH2I } = require('@davixlabs/h2i-sdk');
const h2i = new DavixH2I({ apiKey: process.env.DAVIX_H2I_API_KEY, baseUrl: process.env.DAVIX_H2I_URL });
const result = await h2i.documents.mailMerge({
"to": "docx",
"response": "url",
"output_bundle": "zip"
});
console.log(result.data, result.requestId);PHP
<?php
require 'vendor/autoload.php';
$h2i = new \Davix\H2I\Client(['apiKey' => getenv('DAVIX_H2I_API_KEY'), 'baseUrl' => getenv('DAVIX_H2I_URL')]);
$result = $h2i->documents()->mailMerge([
'to' => 'docx',
'response' => 'url',
'output_bundle' => 'zip',
]);
echo $result->requestId;Documentation
Guides that use this tool
More in Documents
