Skip to main content

SendEmail


🎯 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"
}

βš™οΈ Parameters​

NameTypeRequiredDefaultDescription
To Email (toEmail)Textβœ…EmptyPrimary recipient email address. Supports static or dynamic values.
CC Email (toEmailCc)TextOptionalEmptyAdditional recipients copied on the email.
Subject (subject)Textβœ…EmptySubject line for the email.
Body (body)Rich textβœ…EmptyMain content of the email (supports HTML and variables).
Template Engine (templateEngine)DropdownOptionalSimple VariablesDefines how placeholders are processed. Options: Simple Variables, Advanced Templates.
Custom SMTP (customSmtp)ToggleOptionalOffEnable to send emails via your own SMTP server instead of the default.
SMTP Host (smtpHost)TextRequired if custom SMTPEmptySMTP server address (e.g., smtp.gmail.com).
SMTP Username (smtpUser)TextRequired if custom SMTPEmptySMTP account username.
SMTP Password (smtpPass)PasswordRequired if custom SMTPEmptySMTP account password (use app-specific credentials if available).
SMTP Port (smtpPort)NumberRequired if custom SMTP587Communication port (25, 465, 587, or 2525).
From Email (customFromEmail)TextOptionalEmptySender 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.