Skip to content

Send Mail

Type key: send_mail_node
Group: Integrations
Category: integration
Tier: CORE

The Send Mail node dispatches an email using an SMTP credential. It supports fully templated recipients, subjects, and HTML bodies, and integrates with the VoodflowMessageLayout system for reusable email templates.

Prerequisites

This node requires an SMTP credential to be configured before use. Go to Voodflow → Credentials, create a new credential of type SMTP, then select it in the credential_id field.

How to create credentials

Handles

HandleDirectionDescription
inputInputData used to resolve {{tags}} in all mail fields
outputOutputPasses through the input data unchanged after mail is sent

Configuration

FieldTypeDefaultDescription
credential_idintegernullID of the SMTP Credential to use for sending
layout_idintegernullOptional VoodflowMessageLayout template ID
from_emailstring""Sender email address; supports {{tags}}
from_namestring""Sender display name; supports {{tags}}
to_emailstring""Recipient address; supports {{tags}}
subjectstring""Email subject line; supports {{tags}}
bodystring""Email body (HTML or plain text); supports {{tags}}
is_htmlbooleantrueWhether to send body as HTML (true) or plain text (false)

SMTP Credentials

The node expects a credential of type smtp with the following fields:

FieldDescription
hostSMTP server hostname
portSMTP port (typically 587 or 465)
encryptiontls, ssl, or null
usernameSMTP authentication username
passwordSMTP authentication password

Store SMTP credentials in Credentials. Never hardcode them in node configuration.

Message Layout System

VoodflowMessageLayout is a reusable email template stored in the database. It wraps the body field inside a consistent HTML structure (header, footer, brand styling).

When layout_id is set:

  1. Voodflow loads the layout record
  2. Injects the rendered body into the layout's content slot
  3. Applies the layout's CSS and wrapping HTML
  4. Sends the composite HTML

When layout_id is null, the body is sent as-is.

Template Support

Every string field supports {{tags}}, resolving against the current ExecutionContext:

FieldExample
to_email{{input.customer_email}}
from_name{{variables.shop_name}}
subjectYour order #{{input.order_id}} has shipped
body<p>Dear {{input.first_name}},</p>

Output

On success, the node emits a confirmation object:

json
{
    "status": "sent",
    "to": "alice@example.com",
    "subject": "Your order #42 is confirmed",
    "timestamp": "2025-03-16T08:00:00+00:00"
}

This allows chaining a Send Mail node with further notification or logging nodes.

Examples

Order Confirmation Email

yaml
Credential: Production SMTP (smtp)
From Email: orders@myshop.com
From Name: { { variables.shop_name } }
To Email: { { input.customer_email } }
Subject: "Your order #{{input.order_id}} is confirmed"
Is HTML: true
Body: |
    <h2>Thank you for your order!</h2>
    <p>Hi {{input.first_name}},</p>
    <p>Order <strong>#{{input.order_id}}</strong> has been received and is being processed.</p>
    <p>Estimated delivery: {{input.delivery_date}}</p>

Bulk Newsletter (with For Each)

Data Model (users with newsletter=true)


For Each (item = user)


Send Mail
  to_email: {{item.email}}
  subject:  "{{variables.newsletter_subject}}"
  layout_id: 5  (Newsletter Layout)
  body:      {{variables.newsletter_body}}

Password Reset (Layout Template)

yaml
Credential: Transactional SMTP (smtp)
Layout ID: 3
To Email: { { input.email } }
Subject: "Reset your password"
Body: |
    <p>Click the link below to reset your password:</p>
    <a href="{{input.reset_url}}">Reset Password</a>
    <p>This link expires in 60 minutes.</p>

Notes

  • credential_id is required — the node throws an exception if not set: "Email credential not selected."
  • Long-running workflows sending many emails should be queued (configure the workflow's queue setting) to avoid timeouts
  • The node logs the send event (but not the full body) to the execution record for auditability

Proprietary software — source-available. All rights reserved.