Add Notification & Reminder Emails to Your App

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 the 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 will need access to scheduled tasks. They are available for users on the Pro plan and above. You do not have access to scheduled tasks while on a trial.

If this is your first time creating an app, you will need to know some basics about adding tables, fields, pages, and views. You may also want to check out About Your Database and Working With Pages for additional information.

Steps

In this example, you will be creating an email notification for customers with new invoices and an email reminder for 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.


  • Go to the "Add Invoice" page

  • Click on the "Add Invoice" form view to edit it:

 
  • Go to the Email Rules section.

  • Click the "Add Rule" button:  

  • 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 is sent.


  • Go to the Tasks section of the builder and click on the Invoices table. 

  • Click the "Add Task" button:

 

  • 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"

 

 
 

  • 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