Table of Contents

Add Notification & Reminder Emails to Your App

Lesley Updated by Lesley

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 tables, fields, pages, and views. You can start by reading our Builder Basics section

Other good resources can be found in our About Your Database and Working With 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 Table

In the Data section of the builder, create a table 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 Table

Create a table to store your Invoice records.

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

  • An auto increment field called "Invoice #"
  • A date/time 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 table 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 grid view 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 view to edit it:
  1. Go to the Email Rules section.
  2. Click the "Add Rule" 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 table 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 table. 
  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
  • 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 table 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?

Workflow Tools

Add Status Indicators to Your App

Contact