Skip to main content

Email Notification

Enable and set up the email recipients to receive notification events from Suger service


Overview

Email notifications let you set up multiple alerts, each with specific recipient addresses and notification scopes. When an event from Suger matches the defined notification scope, an email is automatically sent to the designated recipients.

Configuration

  • Enable Email Notification: Go to the settings page and find the Notification section. Click the button Edit of Notification Configs. Now you can enable the email notification as shown below.

  • Email Notification Scopes: You can add or edit multiple notification scopes by clicking the Add notification scope button. For each scope, you can independently specify the Notification Scopes and Recipients as shown below.

Custom Templates

Custom email templates allow you to personalize your notification emails with dynamic content and professional layouts. You can create templates that automatically incorporate data from your notification events, making your emails more informative and engaging.

Create New Template

  1. Navigate to the settings page
  2. Go to the Notification section
  3. Scroll down to the Templates section
  4. Click the + New Template button
  5. In the template creation slider:
    • Enter a descriptive name for your template
    • Select the evaluator type (currently, only Golang Template is supported)
    • Use the email builder to design your template
    • Click Create to save your template

Use Email Builder

The email builder provides a comprehensive set of tools to create professional-looking emails:

  • Columns: It allows your users to add columns to your design in order to have a better design arrangement.
  • Button: Add any type of button in your email. You can change colors and styles.
  • Divider: It gives your users appropriate spacing at any point they want in their design.
  • Heading: Add headings (from level 1-6) to the design.
  • Text: Text is a built-in tool so users can add text to their designs.
  • Image: To make your emails attractive, you can add images using this tool.
  • Social: It is a built-in tool that lets users add their social media icons to your design.
  • Menu: Menu is a built-in tool used to create navigation menus.
  • HTML: This tool will give your users room to add custom HTML to the design.

Working with Dynamic Data

Using Single Variables
  1. Select a notification event type to make its variables available in the builder. By default, use the BaseNotificationEvent.

  2. In the text or heading tool, click the Merge Tags button and select the variable you want to insert

Looping Over Lists

To display multiple items from a list:

  1. Add a Columns tool to your template
  2. Click the tag symbol on the Columns tool
  3. Select the list you want to iterate over
  4. For complex objects in the list:
    • All variables from the list items become available within the Columns block
    • Use them in text tools just like single variables
  5. For simple values (strings or numbers):
    • Use the this merge tag to access the current item within the Columns block

Apply Templates to Notification Scopes

To use your custom template with a notification scope:

  1. Go to the settings page
  2. Find the Notification section
  3. Click the Edit button of Notification Configs
  4. Scroll down to the Email Notification Scope Templates section
  5. For each notification scope:
    • Select the desired notification scope in the first column
    • Choose one of your created custom templates from the second column

Test Custom Templates

Before using a template in production, you can test it to ensure it works as expected:

  1. In the Email Notification Scope Templates section, click the email icon next to your template
  2. In the test dialog, provide the following information:
    • To Email: The recipient email address for the test
    • CC Emails: Optional comma-separated list of email addresses to CC
    • One event json data: Choose (and modify as you want) between:
      • Mock JSON data files
      • Last recorded events for your organization

You can also edit the template directly from the test dialog by clicking the Edit Template button, which will open the email builder.