To use the notification plugin for sending emails with attachments, you must define the same topic configuration as for sending regular notifications. A notification template must be created, and the corresponding Kafka topics must be defined.
Before proceeding, make sure you understand how to send basic notifications.
This guide explains how to send emails with document attachments through the notification plugin. You’ll learn how to:
Let’s walk through a common scenario: sending a customer a copy of their account details document via email.
If you need to generate the document first, see the document generation guide.
When you generate a document, as explained in the Generating documents guide, you need to reference two key pieces of information:
These values are stored in the process instance with the following structure:
For example, if your document generation used:
The paths would be:
You can verify these values in the process instance details:
Prepare your email template (notification template)
Configure the template you’ll use for the email:
See Managing notification templates for detailed instructions.
Verify Kafka topic configuration
Confirm that the required Kafka topics are properly defined:
Add a Send Message Task (Kafka) and Receive Message Task (Kafka)
In your process definition:
Configure the email request payload (Send Message Task)
On the Send Message Task, add a Kafka send action, add the corresponding kafka topic and create the JSON payload containing all information needed for the email:
Key parameters:
Configure the email success handler (Receive Message Task)
On the Receive Message Task, add a Kafka receive action, add the corresponding kafka topic and configure the node with the following properties:
Run the process
Run the process and check the result in the process instance details:
Field | Description | Example |
---|---|---|
templateName | The unique identifier of your email template | ”accountDetails” |
channel | The delivery channel (use “MAIL” for email) | “MAIL” |
language | Language code (must match a template language) | “en” |
receivers | List of email addresses to receive the message | [“customer@example.com”] |
Field | Description | Example |
---|---|---|
contentParams | Key-value pairs for template variable replacement | {"firstName": "John"} |
attachments | List of files to attach to the email | See below |
Each attachment requires:
After configuring your email notification:
Problem | Solution |
---|---|
Email not received | Verify template name, receiver address, and SMTP configuration |
Missing attachment | Check that the MinIO path is correct and the file exists |
Template errors | Ensure all variables in template have corresponding values in contentParams |
Variable resolution | Confirm process variables use the correct path (check in process instance view) |
For further assistance, check the notification plugin logs in your environment.
To use the notification plugin for sending emails with attachments, you must define the same topic configuration as for sending regular notifications. A notification template must be created, and the corresponding Kafka topics must be defined.
Before proceeding, make sure you understand how to send basic notifications.
This guide explains how to send emails with document attachments through the notification plugin. You’ll learn how to:
Let’s walk through a common scenario: sending a customer a copy of their account details document via email.
If you need to generate the document first, see the document generation guide.
When you generate a document, as explained in the Generating documents guide, you need to reference two key pieces of information:
These values are stored in the process instance with the following structure:
For example, if your document generation used:
The paths would be:
You can verify these values in the process instance details:
Prepare your email template (notification template)
Configure the template you’ll use for the email:
See Managing notification templates for detailed instructions.
Verify Kafka topic configuration
Confirm that the required Kafka topics are properly defined:
Add a Send Message Task (Kafka) and Receive Message Task (Kafka)
In your process definition:
Configure the email request payload (Send Message Task)
On the Send Message Task, add a Kafka send action, add the corresponding kafka topic and create the JSON payload containing all information needed for the email:
Key parameters:
Configure the email success handler (Receive Message Task)
On the Receive Message Task, add a Kafka receive action, add the corresponding kafka topic and configure the node with the following properties:
Run the process
Run the process and check the result in the process instance details:
Field | Description | Example |
---|---|---|
templateName | The unique identifier of your email template | ”accountDetails” |
channel | The delivery channel (use “MAIL” for email) | “MAIL” |
language | Language code (must match a template language) | “en” |
receivers | List of email addresses to receive the message | [“customer@example.com”] |
Field | Description | Example |
---|---|---|
contentParams | Key-value pairs for template variable replacement | {"firstName": "John"} |
attachments | List of files to attach to the email | See below |
Each attachment requires:
After configuring your email notification:
Problem | Solution |
---|---|
Email not received | Verify template name, receiver address, and SMTP configuration |
Missing attachment | Check that the MinIO path is correct and the file exists |
Template errors | Ensure all variables in template have corresponding values in contentParams |
Variable resolution | Confirm process variables use the correct path (check in process instance view) |
For further assistance, check the notification plugin logs in your environment.