Skip to content

Email Steps

Both steps send through WordPress’s own mail function, wp_mail, so they use whatever delivers the rest of your site’s email: the host, or an SMTP or email-service plugin. Neither needs a FlowMint credential.

SettingRequiredWhat it doesDefault
toYesOne address, or a list.—
subjectYesThe subject line.—
bodyYesThe message.—
is_htmlNoSend the body as HTML.false (plain text)
from_emailNoThe sender address. Without it, WordPress’s default sender is used.—
from_nameNoThe sender name. Used only with from_email.—
reply_toNoThe Reply-To address.—
cc, bccNoOne address, or a list.—

Output: sent, recipients, deduplicated.

{ "name": "confirm", "type": "send_email",
"skip_if": "{{ is_empty(data.email) }}",
"config": {
"to": "{{ data.email }}",
"subject": "Your booking for {{ labels.workshop }}",
"body": "Hi {{ labels.first_name }},\n\nYour place on {{ labels.workshop }} is held.",
"reply_to": "bookings@example.com"
} }

Use labels.* for anything the recipient reads, so a dropdown shows its label rather than its stored value.

Sends a message whose body is a template file.

SettingRequiredWhat it does
toYesOne address, or a list.
subjectYesThe subject line.
templateYesThe template name, without extension.
is_htmlNoOverrides the format the file’s extension gives.
from_email, from_name, reply_toNoAs for send_email.

There is no cc or bcc on this step.

Output: sent, recipients, template, deduplicated.

Templates live in wp-content/uploads/fmw-templates/ as <name>.html (sent as HTML) or <name>.txt (sent as plain text); if both exist, the .html file is used. Names are lowercase letters, digits, - and _. Placeholders in the file are filled in like any other.

Put files there over SFTP, or with the REST API (PUT /wp-json/flowmint/v1/connector/templates/<name> with content and extension, up to 256 KB; saving one extension removes a file with the other). The connector can list templates and read one (flowmint_list_templates, flowmint_get_template) but not write them.

A missing template fails with template_not_found, which is not retried.

You can also pull a template into any text setting with {{ template('name') }}, for example as the body of send_email.

Both steps remember each message for an hour, keyed by run, recipient and subject. A second send in the same run with the same recipient and subject is skipped and reports deduplicated: true. A replay is a new run, so it sends again.

  • sent: true means WordPress accepted the message, not that it was delivered. If it never arrives, check your mail setup: many hosts block outgoing mail, and an email-sending service plugin that delivers over HTTPS fixes that.
  • A blank recipient or subject fails with config_error: the path in to or subject did not resolve.
  • The mailer refused the message fails with email_send_failed and the mailer’s reason.