Mail Merge Data String (Single Doc)

Use this action to generate document by merging a template file with text containing data. The template can be in word, containing mail merge fields, or PDF containing form fields. This action help in generating only a single document.

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 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.

Output

FileUrl

The file contains the generated document. The output file type would depend on the template type.

File NameString

File Name without extension

Full File NameString

File Name with extension

File ExtensionString

File extension