Send Message
mailgun.send_message
ActionEmailconnection required
Calls the Mailgun API with the connection's credentials.
Send one message through the Mailgun messages endpoint, with optional CC/BCC, a stored template, tags, scheduled delivery and attachments.
Connection
- Required
- Yes — the node will not save without one
- Auth type
- Username & password
- Providers
- Mailgun
- Secret shape
- the private API key: {"username": "api", "password": "…"}, or {"api_key": "…"}, or the raw key
- Config it needs
- domain, region, from_email, base_url
- Resolved by
- config.connection_id, else node.connection_id
Configuration
16 fields, 1 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.
| Field | Type | Required | Default | Constraints | Example |
|---|---|---|---|---|---|
to Recipient address, or several separated by commas. | string | Yes | — | — | — |
from Sender address, e.g. 'Acme <no-reply@mg.acme.com>'. Falls back to the connection's default from address. | string | No | — | — | — |
subject Subject line of the message. | string | No | — | — | — |
text Plain-text body of the message. | string | No | — | — | — |
html HTML body of the message. | string | No | — | — | — |
cc CC addresses, comma separated. | string | No | — | — | — |
bcc BCC addresses, comma separated. | string | No | — | — | — |
reply_to Address to put in the Reply-To header of the message. | string | No | — | — | — |
template Name of a stored Mailgun template to render instead of a body. | string | No | — | — | — |
template_variables Values substituted into the stored template, as a JSON object. | object | No | — | — | — |
tags Tags to attach to the message; Mailgun allows at most three. | array | No | — | array of string | — |
delivery_time Schedule delivery for this RFC-2822 time, e.g. 'Fri, 25 Oct 2026 23:10:10 -0000'. | string | No | — | — | — |
tracking Override the domain's open/click tracking for this message. | string | No | — | one of "yes", "no", "htmlonly" | — |
test_mode Accept and log the message without actually delivering it. | boolean | No | false | — | — |
attachments Files to attach, as objects with 'filename', 'content_type' and the bytes in 'content' (or 'file_content', so a download node's blob wires straight in) with 'content_encoding' set to 'base64' for binary data. | array | No | — | array of object | — |
domain Sending domain for this call; overrides the domain on the connection. | string | No | — | — | — |
- At least one of text, html, template must be set.
Example configuration
Every value below is the contract’s own example or default — nothing invented.
{
"test_mode": false
}Output
One shape.
result
| Field | Type | Example |
|---|---|---|
id The queued message id Mailgun assigned. | string | — |
message Mailgun's acceptance message. | string | — |
to The recipient addresses the message was queued for. | array | — |
{
"id": "",
"message": "",
"to": []
}Notes
- The region and sending domain come from the connection; set 'domain' only to send from a second domain on the same account.
- A message, attachments included, may not exceed 25 MB.
See Send Message run in a workflow.
In a technical demo we add the Mailgun connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.