Reference · Tools
Mandrill
Send transactional emails via the Mandrill (Mailchimp Transactional) API with support for templates, HTML, merge variables, and binary file attachments.
The Mandrill node sends transactional email through Mailchimp Transactional, supporting templates, raw HTML, merge variables and binary attachments. A typical build is sending a receipt from a Mandrill template with per-customer merge variables and the PDF attached.
- Node type
- Action (binary)
- Parameters
- 16
- Outputs
- Output, Error
- Credentials
- Mandrill API
Mandrill
Send transactional emails via Mandrill API with templates and attachments
Overview
The Mandrill tool sends transactional emails through the Mandrill API (Mailchimp Transactional Email). It supports two operations: (1) sendHtml — send an email with raw HTML content, and (2) sendTemplate — send an email using a pre-defined Mandrill template with merge variable substitution. Both operations support binary file attachments from upstream items. Supports tracking, metadata, merge variables, scheduling, subaccounts, Google Analytics integration, and custom email headers.
Category: Communication
Tool Name: mandrill
Version: 1
Appearance: Icon: lucide-Mail | Color: #FFD94C
Node Type
Action (Binary) — handles file/binary data operations
Input / Output
| Direction | Port(s) |
|---|---|
| Input | Input |
| Output | Output, Error |
Credentials
This tool requires Mandrill API credentials. See the Credentials Guide for setup instructions.
Resources
| Resource | Value |
|---|---|
| Message | message |
Operations
| Operation | Value | Description |
|---|---|---|
| Send Template | sendTemplate | Send message based on a Mandrill template |
| Send HTML | sendHtml | Send message based on raw HTML content |
Parameters
Send HTML takes no parameters of its own — see All Operations, and put the body in Options → HTML.
Message: Send Template
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Template | string | Yes | — | The template slug to use. Find template slugs in the Mandrill dashboard under Outbound > Templates. Supports expressions. |
All Operations
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| From Email | string | Yes | — | Email address of the sender, optionally with name: “Name <email>”. Supports expressions. |
| To Email | string | Yes | — | Email address of the recipient. Multiple addresses can be separated by commas. Supports expressions like {{ $json.email }}. |
| JSON Parameters | boolean | No | false | Whether to provide merge vars, metadata, headers, and attachments as raw JSON strings instead of UI fields. |
| Options | collection | No | {} | The message body plus every delivery, tracking and content setting. |
| — Async | boolean | No | false | Whether to enable background sending mode optimized for bulk sending. Messages with more than 10 recipients are always sent asynchronously. |
| — Auto Text | boolean | No | false | Whether to automatically generate a text part for messages that are not given text. |
| — Auto HTML | boolean | No | false | Whether to automatically generate an HTML part for messages that are not given HTML. |
| — BCC Address | string | No | — | An optional address to receive an exact copy of each recipient’s email. Supports expressions. |
| — From Name | string | No | — | Optional from name to be used. Supports expressions. |
| — Google Analytics Campaign | string | No | — | Value to set for the utm_campaign tracking parameter. If not provided the email’s from address will be used. |
| — Google Analytics Domains | string | No | — | Comma-separated domains for which matching URLs will have Google Analytics parameters appended automatically. |
| — HTML | string | No | — | The HTML content of the email. Supports expressions. |
| — Important | boolean | No | false | Whether this message is important and should be delivered ahead of non-important messages. |
| — Inline CSS | boolean | No | false | Whether to automatically inline all CSS styles in the HTML. Only for HTML documents less than 256KB. |
| — IP Pool | string | No | — | The name of the dedicated IP pool to use. If not set or pool does not exist, the default pool is used. |
| — Preserve Recipients | boolean | No | false | Whether to expose all recipients in the To header for each email. |
| — Return Path Domain | string | No | — | A custom domain to use for the message’s return-path. |
| — Send At | dateTime | No | — | Scheduled send time as UTC timestamp (YYYY-MM-DD HH:MM:SS). Past times send immediately. Additional fee applies. |
| — Signing Domain | string | No | — | A custom domain to use for SPF/DKIM signing instead of mandrill. |
| — Subaccount | string | No | — | The unique ID of a subaccount for this message. Must already exist or will fail with an error. |
| — Subject | string | No | — | Subject line of the email. Supports expressions. |
| — Tags | string | No | — | Comma-separated tags for the message. Max 100 unique tags, max 50 chars each. Tags starting with ”_” are reserved. |
| — Text | string | No | — | The plain text content of the email. Supports expressions. |
| — Track Clicks | boolean | No | false | Whether to turn on click tracking for the message. |
| — Track Opens | boolean | No | false | Whether to turn on open tracking for the message. |
| — Tracking Domain | string | No | — | A custom domain to use for tracking opens and clicks instead of mandrillapp.com. |
| — URL Strip QS | boolean | No | false | Whether to strip the query string from URLs when aggregating tracked URL data. |
| — View Content Link | boolean | No | false | Whether to remove content logging for sensitive emails. |
Merge Vars (mergeVarsJson) | json | No | — | Global merge variables as a JSON array of {name, content} objects. (shown when JSON Parameters is true) |
Metadata (metadataJson) | json | No | — | Metadata as a JSON object of key-value pairs. Up to 10 fields are searchable via Mandrill search API. (shown when JSON Parameters is true) |
Attachments (attachmentsJson) | json | No | — | Attachments as a JSON array of {type, name, content} objects where content is base64-encoded. (shown when JSON Parameters is true) |
Headers (headersJson) | json | No | — | Custom email headers as a JSON object. Most headers are allowed. (shown when JSON Parameters is true) |
Merge Vars (mergeVarsUi) | fixedCollection | No | {} | Global merge variables for template substitution. (shown when JSON Parameters is false) |
| — Name | string | No | — | Merge variable name (e.g., FNAME). |
| — Content | string | No | — | Merge variable content value. Supports expressions. |
Metadata (metadataUi) | fixedCollection | No | {} | Custom metadata key-value pairs. Up to 10 fields are searchable via Mandrill search API. (shown when JSON Parameters is false) |
| — Name | string | No | — | Metadata key name. |
| — Value | string | No | — | Metadata value. Supports expressions. |
Attachments (attachmentsUi) | fixedCollection | No | {} | File attachments. Add manual base64 attachments or reference binary properties from upstream nodes. (shown when JSON Parameters is false) |
| — MIME Type | string | No | — | The MIME type of the attachment. Part of a Manual Attachment entry. |
| — File Name | string | No | — | The file name of the attachment. Part of a Manual Attachment entry. |
| — Content (Base64) | string | No | — | The content of the attachment as a base64-encoded string. Part of a Manual Attachment entry. |
| — Binary Property | string | No | data | Name of the binary property containing data to attach to the email. Part of a Binary Attachment entry. |
Headers (headersUi) | fixedCollection | No | {} | Custom email headers (most headers are allowed). (shown when JSON Parameters is false) |
| — Name | string | No | — | Header name (e.g., Reply-To). |
| — Value | string | No | — | Header value. Supports expressions. |
| Max Concurrency | number | No | 10 | Maximum number of items to process concurrently. |
Output Data
One email per input item and one output item per input item — this node never fans out, even when To Email lists several recipients. The Mandrill result is written to mandrillResponse on the output item; the rest of the item JSON passes through unchanged and binary data is forwarded.
{
"mandrillResponse": []
}
mandrillResponse holds Mandrill’s send result exactly as returned — an array with one entry per recipient the message was addressed to. Address a single recipient’s result as {{ $json.mandrillResponse[0] }}, and use a Split Out node on mandrillResponse if you want one workflow item per recipient.
Attachments. Two routes reach the same place: name an upstream binary property in an Attachments → Binary Attachment entry, or supply base64 content yourself in a Manual Attachment entry (or in Attachments as JSON when JSON Parameters is on).
Usage Examples
- Send an HTML email with a PDF attachment via Mandrill
- Send a template-based email with merge variables
- Send bulk transactional emails with tracking enabled
- Send email with binary file attachments from upstream nodes
- Send a scheduled email for later delivery
Example Configuration
Send an HTML email — note that the body lives in Options:
{
"type": "mandrill",
"parameters": {
"resource": "message",
"operation": "sendHtml",
"fromEmail": "sender@example.com",
"toEmail": "recipient@example.com",
"jsonParameters": false,
"options": {
"subject": "Welcome to Our Service",
"html": "<h1>Welcome!</h1><p>Thank you for joining us.</p>",
"text": "Welcome! Thank you for joining us.",
"fromName": "Welcome Team",
"trackOpens": true,
"trackClicks": true
}
}
}
Send a template email with merge variables and metadata entered as UI fields:
{
"type": "mandrill",
"parameters": {
"resource": "message",
"operation": "sendTemplate",
"template": "welcome-template",
"fromEmail": "Welcome Team <welcome@example.com>",
"toEmail": "{{ $json.email }}",
"jsonParameters": false,
"options": {
"subject": "Welcome {{ $json.firstName }}!",
"fromName": "Customer Success",
"trackOpens": true,
"important": true,
"tags": "welcome,onboarding"
},
"mergeVarsUi": {
"mergeVarsValues": [
{
"name": "FNAME",
"content": "{{ $json.firstName }}"
},
{
"name": "COMPANY",
"content": "{{ $json.company }}"
}
]
},
"metadataUi": {
"metadataValues": [
{
"name": "user_id",
"value": "{{ $json.userId }}"
},
{
"name": "signup_source",
"value": "website"
}
]
}
}
}
Send an email with an attachment, with merge vars, attachments and headers supplied as JSON:
{
"type": "mandrill",
"parameters": {
"resource": "message",
"operation": "sendHtml",
"fromEmail": "orders@example.com",
"toEmail": "customer@example.com",
"jsonParameters": true,
"options": {
"subject": "Your Order Invoice #12345",
"html": "<h1>Order Complete</h1><p>Please find your invoice attached.</p>",
"fromName": "Order Processing",
"trackOpens": true
},
"mergeVarsJson": "[{\"name\": \"ORDER_ID\", \"content\": \"12345\"}, {\"name\": \"TOTAL\", \"content\": \"$149.99\"}]",
"attachmentsJson": "[{\"type\": \"application/pdf\", \"name\": \"invoice-12345.pdf\", \"content\": \"JVBERi0xLjQKJcOkw7zDtsOuw6A\"}]",
"headersJson": "{\"Reply-To\": \"support@example.com\", \"X-Order-ID\": \"12345\"}"
}
}
Scheduled email with custom tracking:
{
"type": "mandrill",
"parameters": {
"resource": "message",
"operation": "sendTemplate",
"template": "monthly-report",
"fromEmail": "reports@example.com",
"toEmail": "admin@example.com,manager@example.com",
"jsonParameters": false,
"options": {
"subject": "Monthly Performance Report",
"sendAt": "2024-12-01T09:00:00Z",
"trackOpens": true,
"trackClicks": true,
"trackingDomain": "tracking.example.com",
"tags": "reports,monthly,automated",
"preserveRecipients": false,
"important": true
},
"mergeVarsUi": {
"mergeVarsValues": [
{
"name": "MONTH",
"content": "November 2024"
},
{
"name": "REVENUE",
"content": "$45,230"
}
]
}
}
}
Attach a file that an upstream node downloaded, without touching base64:
{
"type": "mandrill",
"parameters": {
"resource": "message",
"operation": "sendHtml",
"fromEmail": "reports@example.com",
"toEmail": "{{ $json.email }}",
"jsonParameters": false,
"options": {
"subject": "Your report is ready",
"html": "<p>The report is attached.</p>"
},
"attachmentsUi": {
"attachmentsBinary": [
{
"property": "data"
}
]
}
}
}
Error Handling
| Mode | Behavior |
|---|---|
| stop | Halts workflow on first error |
| continue | Skips failed items, passes successful ones through |
| errorPort | Routes failed items to Error output port |
Tips
Send transactional emails via Mandrill API with templates, HTML, merge variables, and binary attachments.
Key Notes
- The body lives in Options. There is no top-level HTML or Subject field — open Options and add HTML, Text and Subject there, for both operations.
- JSON Parameters switches the whole panel. With it off you get the four UI builders (Merge Vars, Metadata, Attachments, Headers); with it on you get the four raw-JSON fields instead. The two sets never appear together, so pick one style per node.
- Braces belong to the workflow, not to Mandrill. Anything you type as
{{ … }}is evaluated as a workflow expression before Mandrill sees it, and only$json,$index,$itemCount,$datetimeand$uuidare understood. Personalise from item data with{{ $json.firstName }}, and pass template placeholders through Merge Vars rather than writing them into the subject or body. - Template Send needs a slug, not a name. Copy it from Outbound > Templates in the Mandrill dashboard.
- Send At is a paid extra on Mandrill, and a timestamp in the past sends straight away.
Frequently asked questions
Where are the Subject and HTML fields?
Inside Options. There is no top-level HTML or Subject field — open Options and add HTML, Text and Subject there, for both operations. This surprises most people configuring it for the first time.
What does the JSON Parameters toggle change?
It swaps the whole panel. Off gives you the four UI builders for Merge Vars, Metadata, Attachments and Headers; on gives you the four raw-JSON fields instead. The two sets never appear together, so pick one style per node.
Why is my merge syntax being evaluated?
Braces belong to the workflow: `{{ … }}` is resolved as a workflow expression before Mandrill receives the content. Use workflow expressions for per-item values rather than expecting Mandrill's own syntax to survive.
Can it send attachments?
Yes — binary file attachments are supported, so a document produced upstream can be attached to the message.
Build with the Mandrill node
Drop it into a workflow, wire it to an agent, or call it on a schedule. You'll need Mandrill API credentials first.
Open BusyBotLast updated . Spotted something wrong? Tell us.