Table of Contents

Add Notification & Reminder Emails to Your App

Sarto Jama Updated by Sarto Jama

Scenario 

You want to add notifications and reminders to your app to keep your users automatically aware of any updates. You want to send customized emails at any step of a workflow process.

A common example is sending a customer an email notification to let them know they need to pay an invoice.

Requirements

For the reminder emails set up in this guide, you'll need access to scheduled tasks. They are available for users on the Pro plan and above. You do not have access to scheduled tasks on the trial.

If this your first time creating an app, you'll need to know some basics about adding objects, fields, pages, and views. You can start by reading our Builder Basics section

Other good resources can be found in our designing the database and building pages sections of the knowledge base.

Steps

In this example, you will be creating an email notification for customers with new invoices and an email reminder to customers with overdue invoices.

Create the Customers Object

In the Schema section of the builder, create an object to store your customers.

For this example, you'll need the following fields:

  • The default "Customer Name" field (which is automatically added)
  • An email field called "Email"

Create the Invoices Object

Create an object to store your Invoice records.

For this example, you'll need to add the following fields:

  • An auto increment field called "Invoice #"
  • A date field called "Invoice Date"
  • A currency field called "Amount"
  • A multiple choice field called "Status" with the following options:
    • Unpaid (make this the default option)
    • Paid
  • An equation field called "Days Unpaid" with the following equation and settings:
    • Equation Type: Date
    • Date Type: days
    • Result Type: Number
    • Equation: currentTime() - {Invoice Date}
    • Rounding: Round Down
  • A one-to-many connection field to the Customers object called "Customer"
    • The connection will allow you to link each Invoice to one Customer and to link each Customer to multiple Invoices.

Create an Invoices Page

In the Pages section of the builder, add a new page. Name it Invoices.

Create the following views on the page:

  • A menu linked to a form that adds a new Invoice
  • A table to display invoices

Call the page "Invoices":

Create an Email Notification for New Invoices

Now that you have a form for creating new invoices, you can send invoice notifications to customers through the form's Email section.

  1. Go to the Add Invoice page
  2. Click on the Add Invoice form to edit it:
  1. Go to the Email section.
  2. Click the Add Email button:  

5. Set up your email notification using the following settings:

  • Action: Send a custom email
  • When: Every form submission (the default)
  • Send: To: an email field "Customers (Customer) > Email"
  • Message: 
    • From Name
      • Your name or your company's name
    • From Email
      • Your email or a department/company email
    • Subject 
      • Input the custom subject line you want the customer to see
    • Message
      • Input the custom message you want the customer to receive. You can include fields from the Invoice object in your message.

For more details on setting up a form email, check out the Send Emails article.

Create a Task for Unpaid Invoice Reminders

You can also send unpaid invoice reminders to customers using a scheduled task. In this example, we'll be sending the reminder a week after the invoice was sent.

  1. Go to the Tasks section of the builder and click on the Invoices object. 
  2. Click the Add Task button:
  1. On the Task tab, use the following settings:  
  • Task Name: "Unpaid Invoice Reminder"
  • Schedule: Daily
  • Next Run Date: choose tomorrow's date and the time when you want the email to be sent 
  • Status: On - this task is running
If you want a chance to test these emails before sending them out, then set the Status to "Off - this task is paused"
  1. On the Action tab, use the following settings:
  • Action: Send a custom email for each record
  • When:
    • "Days Unpaid" is 7
    • "Status" is "Unpaid"
  • Send: To: an email field "Customers (Customer) > Email"
  • Message: 
    • From Name
      • Your name or your company's name
    • From Email
      • Your email or a department/company email
    • Subject 
      • Input the custom subject line you want the customer to see
    • Message
      • Input the custom message you want the customer to receive. You can include fields from the Invoice object in your message.

For more details on setting up a scheduled task email, check out the Send Emails article.

Your Results

Here's how the email notifications and reminders you send will look like:

New Invoice Notification
2018-03-21_10-35-08.png
Unpaid Invoice Reminder
2018-03-21_10-42-37.png
You can add images and HTML to further customize the look of your emails. 

Extend This Workflow

How did we do?

Create a Button or Link that Updates a Field to a Custom Value

Approve New Records Before Displaying Them

Contact