2019.2

Table Of Contents
Items" on page660 task is set to output Records in JSON, it outputs this kind of JSON
data.
If the input is JSON, the task performs a REST call to the
/rest/serverengine/workflow/contentcreation/email/{templateId} endpoint on the Connect Server.
For more information see the REST API Cookbook.
Processing
This task loops through each record in a Record Set or through each JSON object in an array.
For each record or JSON object, the task generates an HTML email using that record's or
object's data.
Note
Content creation may be aborted by a script in a Connect template that raises a fatal error. This
triggers the On Error tab of the Content Creation task. See Designer Script API.
Output
The output of this task is twofold.
On the OL Connect Server's side, pre-rendered email messages are saved in the OL Connect
File Store along with their attachments (and, optionally, also in EML format).
On Workflow's side, information about the pre-rendered email messages become available to
the process via the current Metadata or via a JSON data structure that replaces the active Job
File.
Here is an example of the JSON structure. In this case there's only one email message in the
Content Set.
{"messages":
[
{"attachments":[
{"name":"att0307c655-e14e-4400-8f90-
365032648aed.png","disposition":"inline"},
{"name":"myPDF.pdf","disposition":"attachment"},
],
"subject":"Take action now",
"to":"recipient@gmail.com",
"from":"sender@yourdomain.com",
"folder":8768,
Page 657