Send Email
Allows to send emails programmatically.
Json
Example
json
{
"name": "notification-send-email",
"taskReferenceName": "send_email",
"description": "Send emails",
"type": "SUB_WORKFLOW",
"optional": false,
"inputParameters": {
"mode": "FILE",
"file": "${file_transformation_html.output.file}"
}
}
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
json
{
"name": "notification-send-email",
"taskReferenceName": "send_email",
"description": "Send emails",
"type": "SUB_WORKFLOW",
"optional": false,
"inputParameters": {
"mode": "FILE",
"files": "${file_transformation_html.output.files}"
}
}
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
Definition
Property | Type | Required | Description |
---|---|---|---|
The name (or type) of the task | |||
The unique name of the task in your job. It is used to reference this task in the workflow. | |||
The functional description of this task in your job. | |||
The type of the task. It must be SUB_WORKFLOW . | |||
true : the job continues if there is an error on this task. false : the job fails. | |||
Input parameters of the task. See below |
Inputs
Property | Description |
---|---|
mode | required Enum FILE | FILES . |
file | A valid input in HTML format. It can reference the output of a previous task, example: ${previous_taskReferenceName.output.file} , or a static file, example: file://assets/file.xml , or a user input, example: ${workflow.input.input_key} . |
files | A valid input where each file is an HTML file. It can reference the output of a previous task, example: ${previous_taskReferenceName.output.files} , or a user input, example: ${workflow.input.input_key} . |
Input file
| files
Example
html
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="pl-mail-to" content="user1@your-domain.com;user2@your-domain.com" />
<meta name="pl-mail-cc" content="martin.dupont@product-live.com;martine.dupont@product-live.com" />
<meta name="pl-mail-bcc" content="joseph.durand@product-live.com;josephine.durand@product-live.com" />
<meta name="pl-mail-subject" content="Nouveau produits" />
<meta name="pl-mail-attachments" content="images.zip=https://app.product-live.com/files-data-factory/d05a74cf11788d8f3ae9bf0e0e028dde66f0c83005c5e0d1211b0069945c0c11;pdf.zip=https://app.product-live.com/files-data-factory/fb26911d77fe9a9dc44b111eef5b5db7ca2019c8038445662f29b20c54cb6f29" />
<style>
body {
font-family: 'Segoe UI', sans-serif;
}
b {
color: red;
}
</style>
</head>
<body>
<p>Hello <b>mail!</b></p>
<p>
Attachments can also be <a href="https://app.product-live.com/files-data-factory/d05a74cf11788d8f3ae9bf0e0e028dde66f0c83005c5e0d1211b0069945c0c11">linked</a>
<br>
In this case, if it's a Product-Live link it will be downloaded only if the user is connected.
</p>
</body>
</html>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Definition
It must be a valid HTML file or an array of HTML files. Each HTML file must contain a <meta name="pl-mail-to">
<meta name="pl-mail-subject">
elements and optionally <meta name="pl-mail-attachments">
.
Outputs
Property | Type | Description |
---|---|---|
allEmailsSent | YES | NO . YES : all emails have been sent successfully. NO : at least one email has not been sent. |
Limits and additional notes
- The limitation of emails sent is 50.
FAQ
Can I reference assets in the assets folder?
You cannot reference assets in the assets folder for a security issue.
Can I reference assets on public urls?
You cannot reference assets on public urls for a security issue.