LCS - Email set-up within an application

For emails sent out of any Betty Blocks application to come from an @wisc.edu email address instead of bettyblocks.com, these steps will need to be taken to send an email notification.

SMTP credentials

  1. The service team will set up a configuration with the SMTP credentials which will be encrypted allowing emails to be sent from an @wisc.edu email address.

Action button added to a page

  1. Add an Action button to a page to send email. (This could be a Submit button after filling out a form. In this example, the button will be labeled Send Email) 
    screenshot of action button added
  2. Select Edit to edit the new action button.
    screenshot indicating pencil icon to select to edit the action

Edit the new action

  1. Select Settings to change the name of the new action (e.g. Send email) and the description
    screenshot of settings to change name of action
  2. Edit the Permission settings to determine what roles can perform the action.
  3. Pull in an Expression into the Send email action.
    screenshot of where expression is in the action components list
  4. Pull in a Sub action into the Send email action.
    screenshot showing list of actions with sub action as one of them

Edit the Expression

  1. Add the email body text to the expression.
    screenshot to edit the expression with the email body text on top
  2. Select the Output type as Text.
    1. If you use Text, everything must be in quotes, such as "Enter text here"+" "+"[{first_name}]".
    2. See Betty Blocks documentation on how to use Expressions
  3. Add "email_body" for As Text for the variable.
  4. Save

Edit the Sub action

  1. Within the sub action, select which action to use.  
    screenshot of subaction and where to select the action to pull in

Select the Send Email Sub action from the list.
screenshot of selecting system_sub_send email from the dropdown list

Add the variables for the outgoing email

  1. Within the Sub action, there are multiple input variables. You may want to set up a email configuration that has different values per Sandbox and Production environments.
    1. See BB documentation on how to use configurations
    2.  For example, in Dev sandbox, you may want to use your own email as the recipient_email or reply_to_email, whereas for Production, you may want to use your HR departmental email.
      1. Create a new configuration from Tools.
      2. Name it (e.g. Email) 
      3. Select either Set if you want to enter more than one variable with a value, or Single if you only have one variable with a value. The example below has 2 different variables, recipent_email and reply_to_email.
        screenshot of new configuration called Email with set selected and entry of two variables
      4. Within the action, select the (x) next to the input variable, and select the Email configuration.
        screenshot of sub action input variables and email configuration selected
      5. From Email configuration, select the appropriate configuration item and the value added in configurations will be utilized. 
        screenshot of recipient_email from config selected
    3. The configuration can be merged into other sandbox and Production environments, but the values will need to be added for each new environment.
  2. Add the variables for the outgoing email.
    1. Recipient_name: Either use a variable or the recipient's name if static. This is the person's name who receives the email from the application.
    2. Recipent_email: Either use a variable or the recipient’s email address if static. This is the person's email address who receives the email from the application.
    3. Reply_to_email:
      1. The email address sending out the email will be no-reply-low-code-solutions@wisc.edu. You will not be able to check reply emails to this address.  
      2. Therefore, if the recipient of the email, clicks "reply" and you want to view/check any replies, enter the appropriate reply to email address. 
    4. Cc_email: If N/A remove from the list, otherwise use a variable email address or enter a static email address. 
    5. Subject: Subject of the outgoing email.
    6. Body: Select the variable of email_body just added in the expression for the email body text.
      screenshot of body input variable selecting the email_body variable as input
  3. Save

Return to the page with the action button

  1. Once the action is complete, select the arrow to the left of the Send email action name to go back to the page and the action button should look something like this. 
    screenshot with Send email in the action button on the page


Keywords:
SMTP 
Doc ID:
132830
Owned by:
Jeanne H. in Low Code Solutions
Created:
2023-11-16
Updated:
2024-07-15
Sites:
DoIT Enterprise Business Systems - Low Code Solutions