1. Overview
The Email component (email) sends emails via SMTP from the flow. Supports plain-text or HTML emails, with recipients in carbon copy (CC) and blind carbon copy (BCC).
Use it when the flow needs to notify someone by email (order confirmation, alert, report, etc.). Works only as an output action — not as an entry trigger (it doesn't receive emails).
2. Prerequisites
- An accessible SMTP server (host and port) for sending.
- SMTP authentication username and password, if the server requires it.
3. Authentication and Connection
| Field | Required | Type | Description | Example |
|---|---|---|---|---|
host | Yes, in practice | Text | SMTP server address. | "smtp.example.com" |
port | No | Text | SMTP server port. Default value: "587". | "587" |
protocol | No | Text | Sending protocol. Default value: "SMTP". | "SMTP" |
username | No | Text | Username for SMTP authentication. | "notifications@example.com" |
password | No | Text | SMTP user password. | "mypassword" |
useStartTls | No | Text ("true"/"false") | Enables STARTTLS on the connection. Default value: "true". | "true" |
SMTP authentication is used automatically whenever username and password are filled in.
4. Configuration / Supported Operations
The component has a single operation: send an email.
| Field | Required | Type | Description | Example |
|---|---|---|---|---|
from | Yes | Text | Email sender. | "notifications@example.com" |
to | Yes | Text | Email recipient(s). | "customer@example.com" |
subject | Yes | Text | Email subject. | "Your order has been confirmed" |
isTextMessage | No | Text ("true"/"false") | If true, the body is sent as plain text (using textMessage). If false (default), as HTML (using htmlMessage). | "true" |
textMessage | Yes, if isTextMessage is true | Text | Email body in plain text. | "Your order 981 has been confirmed." |
htmlMessage | No | Text (HTML) | Email body in HTML. | "<p>Your order has been confirmed.</p>" |
cc | No | Text | Carbon-copy recipients. | "manager@example.com" |
bcc | No | Text | Blind carbon-copy recipients. | "audit@example.com" |
5. Practical Examples
Simple example: send a plain-text order-confirmation email.
Input:
{
"orderId": 981,
"customer": { "email": "maria@example.com" }
}
Component configuration:
{
"componentName": "email",
"configurations": {
"from": "notifications@example.com",
"to": "{$.body.customer.email}",
"subject": "Order confirmed",
"isTextMessage": "true",
"textMessage": "Your order {$.body.orderId} has been confirmed."
}
}
Response:
{
"success": true,
"status": "Message sent",
"from": "notifications@example.com",
"to": ["maria@example.com"],
"subject": "Order confirmed",
"messageType": "text/plain"
}
Advanced example: send an HTML email, with a copy to the manager and a blind copy to audit.
Component configuration:
{
"componentName": "email",
"configurations": {
"from": "notifications@example.com",
"to": "{$.body.customer.email}",
"cc": "manager@example.com",
"bcc": "audit@example.com",
"subject": "Order confirmed",
"htmlMessage": "<h1>Order confirmed</h1><p>Your order {$.body.orderId} has been confirmed.</p>"
}
}
Response:
{
"success": true,
"status": "Message sent",
"from": "notifications@example.com",
"to": ["maria@example.com"],
"subject": "Order confirmed",
"messageType": "text/html"
}
6. Common Errors and Troubleshooting
| Error / Symptom | Likely Cause | How to Fix |
|---|---|---|
| "Connector IN Not supported for email" | Attempt to use Email as an entry trigger. | Use the component only as an output action. |
| "From parameter is empty." | The from field wasn't filled in. | Fill in from with the sender. |
| "To parameter is empty." | The to field wasn't filled in. | Fill in to with the recipient(s). |
| "Subject parameter is empty." | The subject field wasn't filled in. | Fill in subject. |
| "Text Message parameter is empty." | isTextMessage is enabled, but textMessage wasn't filled in. | Fill in textMessage or disable isTextMessage to use htmlMessage. |
| Email doesn't reach the recipient | Incorrect host/port/SMTP authentication configuration, or the destination server is blocking it. | Confirm the credentials and configuration of the SMTP server used. |