Send Email

The Send Email node sends emails via SMTP. Use it for notifications, alerts, and transactional emails.

The Send Email node sends emails via SMTP. Use it for notifications, alerts, and transactional emails.

Overview

PropertyValue
Inputs1
Outputs1
Output$nodeLabel.status, $nodeLabel.to, $nodeLabel.cc, $nodeLabel.bcc, $nodeLabel.subject, $nodeLabel.attachment_count

Parameters

ParameterTypeDescription
credentialIdUUIDSMTP credential from Credentials
toexpressionRecipient(s). Comma-separated for multiple.
ccexpressionCarbon-copy recipient(s). Comma-separated for multiple.
bccexpressionBlind carbon-copy recipient(s). Comma-separated for multiple. Hidden from other recipients.
subjectexpressionEmail subject
emailBodyexpressionEmail body content
attachmentsexpressionComma-separated Drive file IDs to attach. Only files owned by the workflow owner can be attached.

Attachments

Attach files from your Drive by passing one or more Drive file IDs to the attachments field. Use a $ expression to reference an upstream Drive node's id output (for example $drive.id), or list static IDs separated by commas. Each ID is resolved in the workflow owner's scope; an invalid or inaccessible ID fails the node rather than sending a partial email.

Setup

Add an SMTP credential with server, port, email, and password. Common SMTP servers:

  • Gmail: smtp.gmail.com, port 587 (App Password required)
  • Outlook: smtp.office365.com, port 587

Example

{
  "type": "sendEmail",
  "data": {
    "label": "notifyUser",
    "credentialId": "smtp-credential-uuid",
    "to": "$userInput.body.email",
    "cc": "manager@example.com",
    "bcc": "audit@example.com",
    "subject": "Your request has been processed",
    "emailBody": "Hello,\n\nYour request for $userInput.body.text has been completed.",
    "attachments": "$drive.id"
  }
}

The attachments value above references an upstream Drive node labeled drive, attaching the file it produced.