For the complete documentation index, see llms.txt. This page is also available as Markdown.

Add custom email templates

Email templates are used within the Send Email action node and when customizing the default authentication emails. We have provided some example templates that leverage best practices to help you quickly start sending customized emails.

The templates are written using MJML. MJML is a markup language and framework for easily generating responsive emails that render on most email clients. When working with MJML you need to copy the HTML generated by MJML into Appfarm Create, and not the MJML code itself.

Plain text versions of each email must also be included as a fallback option.

Email deliverability is an expansive topic that won't be explored here, but you should be familiar with some of the key principles before you begin creating your own templates or heavily modifying the examples.

Authentication

It is possible to customize the default authentication emails that are sent to users by Appfarm when they initiate a login request. The examples below are based on the default emails sent by Appfarm. These make a great starting point for customization, particularly if you simply wish to modify the text.

The parameters surrounded by {{double braces}} will be automatically populated by Appfarm when an email is sent.

Text surrounded by [[square brackets]] should be edited to suit your solution.

Where to add the templates

In Appfarm Create, go to Configuration > Login and open a login config. Each authentication email has its own section: Reset password mail template, Welcome mail template, Login link mail template, and One time password mail template. Each section has the settings From Display Name, Reply-To Address, Subject, Text Body Template, and HTML Body Template. Paste the HTML generated by MJML into HTML Body Template and the plain text version into Text Body Template.

Available parameters

Email
Parameters

Welcome

firstName, lastName, resetLink, loginLink, email, hostName

Login link

firstName, lastName, loginLink, email, hostName

Access code (one-time password)

firstName, lastName, oneTimePassword, email

Set password

firstName, lastName, resetLink, email, hostName

Welcome

The welcome email can be sent when a user is added to a solution via the Create User Account action.

Open template on mjml.io to edit and view HTML.

The login link email is sent when a user requests a login link to log in to an app.

Open template on mjml.io to edit and view HTML.

Access code (one-time password)

The access code (one-time password) email is sent when a user requests an access code to log in to an app.

Open template on mjml.io to edit and view HTML.

Set password

The set password email is sent when a user requests to set or reset their password.

Open template on mjml.io to edit and view HTML.

Order confirmation

This generic order confirmation is an example of an email that can be customized for use in the Send Email action node.

Note: This is just a design template. If you wish to iterate over an object when the email is sent, for example to display multiple order lines, you will need to edit the generated HTML accordingly.

Open template on mjml.io to edit and view HTML.

Last updated

Was this helpful?