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.

::: warning 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

Handle Direction Description
input Input Data used to resolve {{tags}} in all mail fields
output Output Passes through the input data unchanged after mail is sent

Configuration

Field Type Default Description
credential_id integer null ID of the SMTP Credential to use for sending
layout_id integer null Optional VoodflowMessageLayout template ID
from_email string "" Sender email address; supports {{tags}}
from_name string "" Sender display name; supports {{tags}}
to_email string "" Recipient address; supports {{tags}}
subject string "" Email subject line; supports {{tags}}
body string "" Email body (HTML or plain text); supports {{tags}}
is_html boolean true Whether to send body as HTML (true) or plain text (false)

SMTP Credentials

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

Field Description
host SMTP server hostname
port SMTP port (typically 587 or 465)
encryption tls, ssl, or null
username SMTP authentication username
password SMTP 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:

Field Example
to_email {{input.customer_email}}
from_name {{variables.shop_name}}
subject Your 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)

TEXT
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