Skip to content

Email node

The Email node sends a transactional email — an order confirmation, a contact-form notification, a password reset — through the Resend provider. It's an I/O node, so it can fail on the provider's side and carries an error port.

Component id: flowrunner/email.

How it works

The node resolves its fields (each supports ${env.X} and ${secrets.X}), then calls the email helper:

  • to — the recipient address. Required; a missing recipient fails the node (email: missing recipient).
  • subject — the subject line.
  • body — the HTML body of the message.

The send degrades gracefully. If no RESEND_API_KEY is configured on the server, the node does not fail — it logs what it would have sent and records a no-op result. This lets email-shaped flows run in a dev or unconfigured environment without breaking the request.

The result is stored under resultVar (default email):

text
{ sent: <boolean>, reason: <string | null> }
Outcomesentreason
Sent successfullytruenull
No RESEND_API_KEY configuredfalse"no_provider"
Provider rejected the sendfalse"provider_error_<status>"
Send threwfalsethe error message

Config

FieldRequiredDescription
toYesRecipient email address. Resolves ${env.X} / ${secrets.X}. Missing recipient fails the node.
subjectNoSubject line. Resolves ${env.X} / ${secrets.X}.
bodyNoHTML body of the email. Resolves ${env.X} / ${secrets.X}.
resultVarNo (default email)Variable the { sent, reason } result is stored under.

NOTE

The to, subject, and body fields only resolve ${env.X} and ${secrets.X} — they do not interpolate flow references like ${start.name}. To personalise a message from request data, build the string in a Template node first, then pass its result to the Email node.

Ports

PortFollowed when
nextThe send completed or was a graceful no-op. Check email.sent to know which.
errorOnly when the send throws an unexpected error, or when the recipient is missing.

Because a missing provider key is a no-op (not a failure), the error port is reserved for genuinely unexpected problems. To react to an unsent message in normal operation, branch on email.sent with an If node.

Example

Notify the business when a contact form is submitted:

text
Template  var: html   template: "<p>New message from ${start.email}: ${start.message}</p>"
Email  to: ${env.OWNER_EMAIL}   subject: "New contact form"   body: html.value

TIP

Server email delivery is turned on with RESEND_API_KEY (and an EMAIL_FROM sender). See Environment variables for how to configure it. Until then, the Email node runs as a safe no-op.

See also

FlowRunner — the no-code platform for small businesses.