Create Template

mandrill.create_template
ActionEmailconnection required

Calls the Mandrill API with the connection's credentials.

Add a template to the account, published by default, and return the stored template.

Connection

Required
Yes — the node will not save without one
Auth type
API key
Providers
Mandrill
Secret shape
the API key, or {"api_key": "…"}
Config it needs
base_url, from_email, from_name, subaccount, ip_pool
Resolved by
config.connection_id, else node.connection_id

Configuration

8 fields, 1 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.

FieldTypeRequiredDefaultConstraintsExample
name
Name for the new template; it must be unique in the account and becomes the immutable slug.
stringYes——welcome-email
from_email
Default sending address for messages that use this template.
stringNo—email format—
from_name
Default from name for messages that use this template.
stringNo———
subject
Default subject line for messages that use this template.
stringNo———
code
HTML for the template, using mc:edit attributes to mark the regions a send can replace.
stringNo———
text
Default plain-text part for messages that use this template.
stringNo———
publish
Publish the change as well as saving the draft. Set false to leave the live copy alone.
booleanNo———
labels
Up to ten labels used to filter templates; a comma-separated list is accepted.
arrayNo—≤ 10 characters; array of string—

Example configuration

Every value below is the contract’s own example or default — nothing invented.

{
  "name": "welcome-email"
}

Output

One shape.

result

FieldTypeExample
slug
Immutable identifier of the template.
string—
name
Human-readable name of the template.
string—
labels
Labels the template is filed under.
array—
code
Draft HTML, with its mc:edit regions.
string—
subject
Draft default subject line.
string—
from_email
Draft default sending address.
string—
from_name
Draft default from name.
string—
text
Draft default plain-text part.
string—
publish_name
Name of the published version.
string—
publish_code
Published HTML.
string—
publish_subject
Published default subject line.
string—
publish_from_email
Published default sending address.
string—
publish_from_name
Published default from name.
string—
publish_text
Published default plain-text part.
string—
published_at
When the template was last published, in UTC.
string—
created_at
When the template was created, in UTC.
string—
updated_at
When the template was last updated, in UTC.
string—
draft_updated_at
When the draft was last updated, in UTC.
string—
is_broken_template
True when the template's syntax fails to render.
boolean—
{
  "code": "",
  "created_at": "",
  "draft_updated_at": "",
  "from_email": "",
  "from_name": "",
  "is_broken_template": false,
  "labels": [],
  "name": "",
  "publish_code": "",
  "publish_from_email": "",
  "publish_from_name": "",
  "publish_name": "",
  "publish_subject": "",
  "publish_text": "",
  "published_at": "",
  "slug": "",
  "subject": "",
  "text": "",
  "updated_at": ""
}

Notes

  • Mandrill refuses a name that already exists rather than overwriting it.

See Create Template run in a workflow.

In a technical demo we add the Mandrill connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.