Check first the Send a notification section.

Defining process actions

Example: send an email notification with attached files from a business flow

Let’s pick a simple use-case. Imagine we need to send a copy of a contract signed by a new customer. Before setting the action for the notification, another action must be defined, so the first one will save the new contract using the documents plugin.

See the example from Generating a document from template section

The steps for sending the notification are the following:

1

Configure the template that you want to use for the email, see the Managing notification templates section for more information.

2

Check that the needed topics are defined by going to FlowX Designer > Platform Status > notification-plugin-mngt > kafkaTopicsHealthCheckIndicator > details > configuration > topic > notifications.

3

Use the FlowX Designer to add a new Send Message Task (Kafka) action to the correct node in the process definition.

4

Add the proper configuration to the action, the Kafka topic and message to be sent.

The message to be sent to Kafka will look something like:

{
  "templateName" : "contractCopy",
  "identifier" : "text",
  "language": "en",
  "receivers" : [ "someone@somewhere.com" ],
  "contentParams" : {
    "clientId" : "clientId",
    "firstName" : "first",
    "lastName" : "last"
  },
  "attachments" : [ {
    "filename" : "contract",
    "path" : "MINIO_BUCKET_PATH/contract.pdf"
  } ]
}