Send Email
π― Purposeβ
The SendEmail node enables automated email delivery within ThreoAI workflows.
It supports both simple notifications and dynamic, templated emails, making it useful for customer communication, order confirmations, appointment reminders, and team notifications.
π₯ Inputsβ
- Dynamic Data: Email addresses, subject lines, and message bodies can be pulled from previous nodes.
- Supports multiple recipients and CC addresses.
π€ Outputsβ
The node returns confirmation of successful email delivery or an error message.
Output Format (example):
{
"email_status": "sent",
"recipient": "user@example.com"
}
```text
## βοΈ Parameters
| Name | Type | Required | Default | Description |
|------|------|----------|---------|-------------|
| **To Email (`toEmail`)** | Text | β
| Empty | Primary recipient email address. Supports static or dynamic values. |
| **CC Email (`toEmailCc`)** | Text | Optional | Empty | Additional recipients copied on the email. |
| **Subject (`subject`)** | Text | β
| Empty | Subject line for the email. |
| **Body (`body`)** | Rich text | β
| Empty | Main content of the email (supports HTML and variables). |
| **Template Engine (`templateEngine`)** | Dropdown | Optional | Simple Variables | Defines how placeholders are processed. Options: *Simple Variables*, *Advanced Templates*. |
| **Custom SMTP (`customSmtp`)** | Toggle | Optional | Off | Enable to send emails via your own SMTP server instead of the default. |
| **SMTP Host (`smtpHost`)** | Text | Required if custom SMTP | Empty | SMTP server address (e.g., `smtp.gmail.com`). |
| **SMTP Username (`smtpUser`)** | Text | Required if custom SMTP | Empty | SMTP account username. |
| **SMTP Password (`smtpPass`)** | Password | Required if custom SMTP | Empty | SMTP account password (use app-specific credentials if available). |
| **SMTP Port (`smtpPort`)** | Number | Required if custom SMTP | 587 | Communication port (25, 465, 587, or 2525). |
| **From Email (`customFromEmail`)** | Text | Optional | Empty | Sender address displayed in recipientsβ inboxes. |
## π‘ Example Usage
- **Customer Welcome Email**: Send a personalized welcome message when a new account is created.
- **Order Confirmation**: Email order and tracking details to customers, with CC to fulfillment teams.
- **Appointment Reminder**: Notify patients of upcoming appointments 24 hours in advance.
- **Support Ticket Updates**: Alert customers and internal staff when ticket status changes.
## π Best Practices
- Use **short, clear subject lines** to improve open rates.
- Apply **dynamic variables** (`{{customerName}}`, `{{orderNumber}}`) for personalization.
- For **better deliverability**, configure custom SMTP with your business domain.
- Avoid spam-trigger words and monitor bounce rates.
- Use **SPF/DKIM authentication** to improve trust and reduce spam filtering.
- Store **SMTP credentials securely** and rotate them periodically.
## π§ͺ Test Cases
- **Given:** `toEmail = test@example.com`, subject = "Hello"
β **Expected:** `{ "email_status": "sent" }`
- **Given:** `ccEmail = manager@example.com`, body includes `{{orderNumber}}` = 12345
β **Expected:** email sent to both addresses with variable replaced.