Send Mail
Sends an email via Microsoft Outlook with support for multiple recipients, attachments, HTML content, and Reply All functionality. This node can either send a new email or create a Reply All response to an existing email.
Common Properties
- Name - The custom name of the node.
- Color - The custom color of the node.
- Delay Before (sec) - Waits in seconds before executing the node.
- Delay After (sec) - Waits in seconds after executing node.
- Continue On Error - Automation will continue regardless of any error. The default value is false.
If the ContinueOnError property is set to true, no error will be caught and the automation will continue running. If a Catch node is used, it will have no effect.
Inputs
- To - Recipient email address(es). For multiple recipients, use comma-separated values (e.g.,
user1@example.com, user2@example.com). Can be empty if using CC or BCC. - Cc - CC recipient email address(es). Comma-separated for multiple recipients. Optional.
- Bcc - BCC recipient email address(es). Comma-separated for multiple recipients. Optional.
- Subject - Email subject line. Optional in Reply All mode (defaults to original subject with "RE:" prefix).
- Body - Email body content. Format depends on the "Is Body HTML" option. Can be plain text or HTML.
- Attachments - Array of file paths to attach to the email. Example:
["C:\\Documents\\report.pdf", "C:\\Documents\\data.xlsx"] - Mail Entry ID (for Reply All) - Entry ID of the original email to reply to. Required when Reply All Mode is enabled. Obtained from Get Mail or Search Mail nodes.
Outputs
This node produces no output values.
Options
- Is Body HTML - If set to
true, the Body content will be sent as HTML. Iffalse, sends as plain text. Default isfalse. - Reply All Mode - If set to
true, creates a Reply All response to an existing email. Requires Mail Entry ID. Default isfalse.
Example Usage
Send a Simple Email
// Configure the Send Mail node inputs:
// To: recipient@example.com
// Subject: Weekly Report
// Body: Please find the weekly report attached.
// No code needed - configure in the node properties
Send Email with Multiple Recipients and HTML Content
Set node options:
- Is Body HTML:
true
// Set inputs in node:
// To: manager@company.com, team@company.com
// Cc: director@company.com
// Subject: Project Status Update
const htmlBody = `
<html>
<body>
<h2>Project Status Update</h2>
<p>Dear Team,</p>
<p>Here's the latest status on the project:</p>
<ul>
<li>Development: 85% complete</li>
<li>Testing: 60% complete</li>
<li>Documentation: 40% complete</li>
</ul>
<p>Best regards,<br>Project Manager</p>
</body>
</html>
`;
// Return htmlBody as the Body input
return htmlBody;
Send Email with Attachments
// Prepare attachment paths
const attachmentPaths = [
"C:\\Reports\\monthly_report.pdf",
"C:\\Data\\sales_data.xlsx",
"C:\\Images\\chart.png"
];
// Set as Attachments input
return attachmentPaths;
// Also configure:
// To: recipient@company.com
// Subject: Monthly Reports and Data
// Body: Please find attached the monthly reports and sales data.
Reply All to an Email
Set node options:
- Reply All Mode:
true
// First, get the email to reply to using Get Mail or Search Mail
const originalEmail = $.GetMailResult[0]; // First email from Get Mail
// Configure Send Mail node:
// Mail Entry ID: originalEmail.entryId (from previous Get Mail node)
// Subject: (leave empty to keep "RE: Original Subject")
// Body: Thank you for your email. I'll review this and get back to you.
// The node will automatically populate To, CC with all original recipients
Send Email with Dynamic Content
// Build email content dynamically
const customerName = $.customerData.name;
const orderNumber = $.customerData.orderId;
const emailSubject = `Order Confirmation - ${orderNumber}`;
const emailBody = `
Dear ${customerName},
Thank you for your order #${orderNumber}.
Your order has been confirmed and is being processed.
Expected delivery: 3-5 business days
Best regards,
Sales Team
`;
// Set these as Subject and Body inputs
return {
subject: emailSubject,
body: emailBody
};
Reply All with Custom Recipients Override
Set node options:
- Reply All Mode:
true
// Get original email
const originalEmail = $.GetMailResult[0];
// Configure Send Mail node to override Reply All recipients:
// Mail Entry ID: originalEmail.entryId
// To: manager@company.com (overrides the Reply All To field)
// Cc: (leave empty to use Reply All Cc)
// Subject: (leave empty to keep RE: prefix)
// Body: Your custom reply message
// This sends to only the manager instead of all original recipients
Send Templated Email with Attachments
// Email template
const template = {
to: "client@example.com",
cc: "sales@company.com",
subject: "Product Information Request",
body: `
Hello,
Thank you for your interest in our products.
Please find attached:
- Product catalog
- Price list
- Technical specifications
Feel free to contact us with any questions.
Best regards,
Sales Team
`,
attachments: [
"C:\\Templates\\catalog.pdf",
"C:\\Templates\\pricelist.xlsx",
"C:\\Templates\\specs.pdf"
]
};
// Configure node with template values
return template;
Tips for Effective Use
-
Multiple Recipients: Separate email addresses with commas. Outlook will handle the parsing automatically.
-
HTML Emails: When using HTML content, ensure proper HTML structure with
<html>,<body>tags for best compatibility. -
Attachment Paths: Always use full absolute paths for attachments, not relative paths. Use double backslashes (
\\) in Windows paths. -
Reply All Functionality: The Reply All mode automatically includes all original recipients (To and CC). You can override them by explicitly setting To, CC, or BCC inputs.
-
BCC for Privacy: Use BCC when sending to multiple recipients who shouldn't see each other's email addresses.
-
File Validation: The node will throw an error if any attachment file doesn't exist. Validate file paths before sending.
-
Large Attachments: Be mindful of Outlook and email server attachment size limits (typically 20-25 MB).
-
Outlook Must Be Running: The automation uses your local Outlook installation, so Outlook must be properly configured.
Common Errors and Solutions
Error: At least one of To, CC, or BCC must not be empty
- Solution: Provide at least one recipient in the To, CC, or BCC field. All three cannot be empty simultaneously.
Error: Mail Entry ID is required when Reply All Mode is enabled
- Solution: When Reply All Mode is enabled, you must provide the Entry ID from the original email (obtained from Get Mail or Search Mail nodes).
Error: Attachment file does not exist: [path]
- Solution: Verify that:
- The file path is correct and the file exists
- You're using the full absolute path
- The file isn't locked by another process
- Windows paths use double backslashes (
\\) or forward slashes (/)
Email sends but attachments are missing
- Solution: Check that:
- Attachment paths are provided as an array:
["path1", "path2"] - File paths are absolute, not relative
- Files are not in use by another application
- Attachment paths are provided as an array:
HTML content displays as plain text
- Solution: Set the "Is Body HTML" option to
truein the node options.
Reply All doesn't include all recipients
- Solution: Ensure the Entry ID is correct and the original email has the recipients you expect. The Reply All mode reads recipients from the original email.
Cannot send email - Outlook security prompt appears
- Solution: This is an Outlook security feature. You may need to:
- Configure Outlook's programmatic access settings
- Run the automation with appropriate permissions
- Consider using Microsoft 365 Mail package instead for cloud-based automation