Email processes with OL Connect tasks

Sending out emails, based on a Connect template, via an automated process requires you to design a Connect email process in the Workflow configuration tool.
This topic explains which tasks and files are used in a Connect email process.

Tip: An easy way to create a Connect email project, including the Workflow configuration and the files that it needs, is to use a Sample Project. See Sample Project: Basic Email.

The structure of an OL Connect email process

In an OL Connect Email process one of two plugins is essential: the Create Email Content plugin or the Render Email Content plugin.

Both plugins can create a set of emails using the Email context in a Connect template.

The difference between the two is that the Create Email Content plugin sends the emails to the email server immediately, whereas the Render Email Content plugin creates the emails and stores them, so that they can be sent later, via SMTP or via an Email Service Provider such as SendGrid or Mailjet.

You have to select the Connect template in the task's properties.

If the template doesn't need any data, you can set the Data Source of the plugin to JSON and enter an empty JSON string: {}.
However, if the template should be merged with data, you will need to add one or more tasks to provide the required data. The plugin must receive either Metadata containing information regarding a valid Record Set, or JSON data. This can be the output of tasks like:

  • An Execute Data Mapping task which retrieves data from the job file (such as the request XML). In addition to creating records in the Connect database, this task can output the (IDs of the) records in the Metadata.

  • A Retrieve Items task which retrieves an existing record set from the Connect database and outputs it in the Metadata or as JSON data.

  • A Create File task that creates a JSON file.

  • Etc.

Which task or tasks fit best, depends on where the data come from.

The Create Email Content and Render Email Content plugins can be found on the OL Connect tab of the Plug-In Bar in Workflow.
For a description of all OL Connect tasks, see OL Connect tasks.

Files used in a Connect email process

Before creating the Email process in the Workflow configuration tool, you will need to create:

Templates and data mapping configurations must be sent from the Designer to OL Connect Workflow before they can be used in the Workflow process; see Sending files to Workflow.

The next step is to create a process in OL Connect Workflow that generates Email output, using these files.
For more information about how to create a process in Workflow, please refer to the Online Help of Workflow.