Mail management
⚡️ Superfast email builder
Last updated
⚡️ Superfast email builder
Last updated
We have implemented a dedicated page or section within the admin panel specifically for handling transactional email templates. This user-friendly interface enables users to effortlessly create and manage various email templates as needed. Additionally, you can customize these templates by incorporating dynamic variables, resulting in personalized that meets your specific requirements.
This dedicated solution streamlines the process of creating, editing, and managing transactional email templates for a more efficient workflow.
openBuild Framework integrates with Postmark and Sendgrid. It uses the openBuild Framework default email template but can just as well be used with any other HTML email template.
The interface and workflows you need to list your stored emails, edit those emails and add new ones, and as well test send them.
Sending emails from your application typically requires incorporating dynamic content, such as a customized greeting, password reset links, or other personalized elements. We achieve this through a 'variable' (or 'vars') system. A variable serves as a placeholder for any type of text, such as a name, a URL, or a reset password token.
When constructing your email, you can insert variables anywhere using the format {{varX}}, where 'X' represents the variable number. An email might have only one variable or multiple variables, like 10 or more.
There will also be a section for defining variables as you create your email, which ensures that everybody understands the intended content when using this email, stored in your app's database. For example, '{{var1}}' might represent a user's first name in one email, while in another, it could be a URL. The variable placeholders remain consistent across all emails, but you determine the specific content for each variable when scheduling your email send events. This approach ensures clarity and personalization in your email communication.
Each email template comes in two versions: 'escaped' and 'html'. We need to escape special characters to prevent issues when sending emails via Postmark or Sendgrid's APIs. In the option set containing the Email templates, there are two fields for each template section:
The original HTML version, used for previewing the email in the mail management page.
The escaped HTML version, required for actually sending the emails.
This setup ensures smooth interaction with email delivery APIs and allows you to preview your email templates accurately.
To escape your own HTML template, use this free tool: https://www.freeformatter.com/html-escape.html
This data type will be used to retrieve the default email template or a custom email template you created. It consists of all the sections that make up the email in two versions: escaped and plain html.
This datatype stores all your emails, including welcome emails, password reset emails, and others. We have included some example templates which can be found under the App Data tab in the Bubble editor.
When creating a new email using the mail management tool, it will be saved in your database as an 'Email' datatype. To send an email, you will need to provide the Unique ID (UID) of the email template you want to send within the 'Send email' action. Additionally, you should include any dynamic content that you want to incorporate into the email. This approach allows for efficient organization and customization of your email templates.
openBuild Framework offers one, flexible, transactional email template that you can use for basically every email you need to send.
The openBuild Framework employs a 'System Option Set' to store information about the app, such as the app name, default color, app email, and logo. While you are not required to use the information from this option set, it's important to consider the formats of the images you wish to display in your email.
For instance, if you want to display a logo or any other image in your email, refrain from using the SVG format, as most email clients do not support it. Instead, opt for image formats like JPG or PNG to ensure proper display across various email clients.
This datatype allows you to manage the footer links you wish to include in your app. Each entry consists of a display name and an associated link. By default, the following links are provided:
Privacy - a link to the privacy policy page
Terms - a link to the terms and conditions page
Feel free to add any number of additional links, and they will be automatically incorporated into your email footer. This versatile option set makes customizing your email footer easy and straightforward.
The send email workflow is composed of two distinct actions:
On the client side, a backend workflow is scheduled, which determines when the email will be sent.
The actual email-sending action is then triggered by this scheduled backend workflow.
This structure enables you to schedule emails conveniently and effortlessly include variable content within the messages.
You will find 📧 Send Email API workflow in Backend workflows. This is the actual POST API call that will send the email via Sendgrid.
After creating and testing your emails in the development version, make use of the Copy and Restore Database feature. This allows Bubble to transfer development data into live data, maintaining the same unique ID for your emails in both versions. As a result, you won't have to manage two distinct workflows since the email record will retain the same unique ID.
Make sure you only copy the Email data type.