Mail Merge with Data String List of Docs in Power Automate
PDF4me Mail Merge with Data String List of Docs is a Power Automate action that turns one Word or PDF template plus a JSON data array into a batch of personalized documents in a single call. Use it to generate offer letters, certificates, or account notices for an entire list of recipients without looping the merge template through the flow one record at a time.
What this action does
PDF4me Mail Merge with Data String List of Docs maps a Word or PDF merge template plus a JSON data array, and returns an array of generated documents, one per data row. Both an array-of-arrays and an array-of-objects Data string shape are supported.
Authenticating Your API Request
To access the PDF4me Web API through Power Automate, every request must include a valid API key. Authentication validates your identity and enables the connector to reach PDF4me's mail merge service from your flow.
Important Facts You Should Not Miss

Map Template File Data and Template File Name, then build the Data string as a JSON array with one entry per document to generate.
Parameters
Required: All three fields, Template File Data, Template File Name, and Data string, must be provided for the action to run.
| Parameter | Required | What it does | Example |
|---|---|---|---|
| Template File Data | Required | Content of the merge template, mapped from a prior action such as SharePoint or OneDrive Get File Content. Must be a .docx or .pdf file containing merge fields. | [Template Content] |
| Template File Name | Required | Name of the template file including its extension, used for processing identification. | LetterTemplate.docx |
| Data string | Required | JSON data to merge into the template. Accepts an array-of-arrays with a header row followed by value rows, or an array of field/value objects. Each row or object after the header generates one document. | [["Name","Email"],["John","[email protected]"]] |
What Does Mail Merge with Data String Return?
| Field | Type | What it contains |
|---|---|---|
Output Documents | Array of Objects | One entry per generated document, directly iterable with Apply to each. |
File Content | Binary | Binary content of each generated document, nested inside each Output Documents entry. |
File Name | String | File name of each generated document, nested inside each Output Documents entry. |
{
"Output Documents": [
{ "File Content": "[Binary Content]", "File Name": "Letter_001.pdf" },
{ "File Content": "[Binary Content]", "File Name": "Letter_002.pdf" }
]
}
How Do I Set Up Mail Merge with Data String in Power Automate?
- Add PDF4me → Mail Merge with Data String List of Docs to your Power Automate flow.
- Map Template File Data and Template File Name from a template stored in SharePoint or OneDrive, containing merge fields that match your data columns.
- Build Data string as a JSON array, either a header row followed by value rows, or an array of field/value objects, one entry per document to generate.
- Run the flow. PDF4me returns Output Documents, an array with one generated document per data row.
- Add an Apply to each action over Output Documents to email, upload, or archive each generated document individually.
Which Data String Format Should I Use?
Use the array-of-arrays format, a header row followed by value rows, when the source data already comes out of Excel or a table-shaped connector as parallel arrays, since it maps directly onto rows and columns. Use the array-of-objects format when the source data comes from a system like a CRM or forms connector that naturally returns named fields per record, since each object's keys already line up with the template's merge field names.
Typical Setups
Workflow ExamplesCommon Power Automate flow patterns using Mail Merge with Data String List of Docs.
- A flow triggers when a training course is marked complete in the LMS.
- Get participant list retrieves every course completer with name and completion date.
- A Compose action builds the Data string as an array of name/course/date objects.
- Mail Merge with Data String generates one certificate per participant in a single call, and an Apply to each loop emails each certificate to its recipient.
- A hiring manager approves a batch of candidates in the ATS, triggering the flow.
- Get candidate data retrieves name, role, and salary for each approved candidate.
- Mail Merge with Data String maps the offer letter template and generates one letter per candidate.
- The Output Documents array is sent to HR for review before individual delivery.
- A recurrence trigger runs a monthly billing-notice flow.
- Get customer data queries the billing system for every account due a notice that month.
- Mail Merge with Data String generates a personalized notice per account from a single notice template.
- An Apply to each loop uploads each notice to the customer's SharePoint folder and sends a summary email.
Practical Tips
Cheat Sheet
| Field | Value |
|---|---|
| Action | Mail Merge with Data String List of Docs |
| Template File Data | .docx or .pdf, mapped from a prior action |
| Template File Name | e.g. LetterTemplate.docx |
| Data string | Array-of-arrays (header + rows) or array-of-objects |
| Documents generated | One per data row/object |
| Output | Output Documents array, each with File Content + File Name |
| Next step | Apply to each over Output Documents |
Common Questions
Industry Use Cases & Applications
- Human Resources & Payroll
- Finance & Banking
- Education & Training
- Marketing & Communications
Human Resources & Payroll Use Cases
- Offer Letters: Generate personalized employment offers for an entire hiring batch in one call
- Onboarding Documents: Create new-hire paperwork for all incoming employees at once
- Performance Reviews: Generate review documents for all staff from a single review cycle
- Benefits Statements: Create personalized benefits summaries for open enrollment
Finance & Banking Use Cases
- Account Statements: Generate statements for every customer in a billing cycle
- Tax Documents: Create tax summaries for all clients ahead of filing deadlines
- Investment Reports: Generate portfolio reports for every investor on file
- Notice Letters: Create account notices for a customer segment in one run
Education & Training Use Cases
- Certificates: Generate completion certificates for every student in a cohort
- Report Cards: Create progress reports for all learners at term end
- Transcripts: Generate transcripts for a graduating class in a single batch
- Parent Letters: Create personalized parent communications for a whole class
Marketing & Communications Use Cases
- Campaign Letters: Generate personalized marketing letters for a target segment
- Customer Notices: Create service-update notifications for affected customers
- Event Invitations: Generate personalized event invites from a registrant list
- Thank You Letters: Create appreciation letters for a customer cohort