An OL Connect email flow in Node-RED

This topic explains which nodes and files are used in a typical OL Connect email flow in Node-RED.

An easy way to create the files that the typical OL Connect email flow needs, is to use a Sample Project. See Sample Project: Basic Email. You would use all files except the Workflow configuration file.

The structure of an OL Connect email flow

In an OL Connect email flow only one plugin is essential: the email content plugin.

The email content node creates a set of emails, using the Email context in a Connect template.
If the template doesn't need any data, set msg.payload to an empty JSON string: {}.

If the template should be merged with data, you will need to provide the required data. The data can be the output of tasks like:

  • An OL Connect 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.
  • An OL Connect data get node which retrieves an existing record set from the Connect database.
  • A standard create file node that creates a JSON file.
  • Etc.

Which node or nodes fit best, depends on where the data come from.

A number of nodes accept runtime parameters. These can be passed via the parameters property of the msg object which is passed between nodes. For example, a runtime parameter named brandId would be passed via msg.parameters.brandId. Use a function node or change node to set the property.

Files used in an OL Connect email flow

Before creating the email flow in the editor of Node-RED you will need to create:

Note that before templates and data mapping configurations can be used in a flow, they must be sent to the OL Connect server separately. This can be done from the Designer (see Sending files to Connect Server or to another server) or in a startup flow (see OL Connect Startup flow).