Mail Merge With Data String (List of Docs)

Use this action to generate documents by merging a template file with text containing data. The template can be in word, containing mail merge fields, or PDF, containing form fields.

The text can be in JSON format.

Parameters

Template FileFile, Required

Document template file. Supported file formats are Word and PDF files

Template File TypeOptions, Required

Template file type. This field helps in defining the template type of the file. The available options are Word and PDF.

Template File NameString

Name for the Template file. Also the name to be given to the list of generated files

Merge DataString, Required

Text containing dynamic data values for merging with template

This step we map template file data and prepared data string with PDF4me mail merge action. Data string is assigned with string function as mentioned below.

Sample Json Structure (List Array):

[
  ["FieldName1", "FieldName2", "FieldName3"],
  ["FieldValue1", "FieldValue2", "FieldValue3"],
  ["FieldValue4", "FieldValue5", "FieldValue6"]
]

json array

(OR)

Sample Json Structure (List Object):
json array

concat(‘[’,variables(‘DataListString’),‘]’)

DataListString – It’s a declared variable that contains list items in prepared format.

Merge Output FileBoolean

Merge an Output File. By default, the value is false and, the output will be a zip containing all the generated documents. If set to true then, all the documents are combined into a single PDF. This option is only valid for PDF-type templates.

Output

FileUrl

The file containing generated document/documents; If Merge Output File value is true and the template type is PDF, then the file will be a PDF. Otherwise, the output will always be a zip.

File NameString

File Name without extension

Full File NameString

File Name with extension

File ExtensionString

File extension