Skip to content

Send Email Node

The Send Email node is used to send emails via Microsoft 365 using a configured service account. This node can dynamically resolve and send to multiple recipients, supports saving the email as a draft, and optionally replies to an existing email thread using an Email ID.


🧩 Node Type

task


📝 Inputs

LabelTypeRequiredDescription
Email Totext[]✔️List of email addresses to send the email to. Can include placeholders.
Subjecttext✔️Subject line of the email. Can include variable placeholders.
Bodytext✔️The email body content (HTML or plain text). Supports placeholder injection.
Save as DraftbooleanOptional flag to save the email to drafts instead of sending immediately.
Email IDtextIf provided, this will be used to reply to an existing email thread.

📤 Outputs

This task does not produce any new output variables, but it sends or drafts an email and updates the task status.


⚙️ Behavior

  • Uses Microsoft service account credentials (ThirdParty-Microsoft) to authenticate.
  • Replaces all placeholders in the input fields using the runtime data dictionary.
  • Handles single or multiple recipients:
    • If a field resolves to an array of strings, all are included as recipients.
  • Deduplicates recipient list.
  • If Save as Draft is set to true, the email is saved instead of sent.
  • If Email ID is provided, the email is treated as a reply in the thread.

💡 Example Usage

FieldValue
Email To[ "user1@example.com", "{managerEmail}" ]
SubjectProject Update for {ProjectName}
BodyHello team, <br/>Please find the latest updates for {ProjectName}.
Save as Draftfalse
Email ID(Optional) AAMkADY1ZDExY...AAA=

🛠️ Implementation Notes

  • Email sending is performed using the EmailService.SendEmail() method from the Microsoft REST service integration.
  • The PropReplacePlaceholders method resolves any tokenized variables from the automation data context.
  • The code ensures that all recipients are valid and deduplicated before sending.
  • Logs success or failure and gracefully handles errors.

❗ Known Limitations

  • HTML formatting in Body must be valid; invalid HTML may cause send errors.
  • No attachments support currently.
  • Only Microsoft 365 (Graph API) is supported as the sending provider.

Tentech 2024