Table of Contents
- What are Emails?
- Manage Email Rules in Forms
- Manage Email Rules in Grids
- Manage Emails using Action Links
- Manage Email Rules in Task
- Email Settings
Send Emails
Updated
by Lesley
- What are Emails?
- Manage Email Rules in Forms
- Manage Email Rules in Grids
- Manage Emails using Action Links
- Manage Email Rules in Task
- Email Settings
What are Emails?
Adding email alerts to your Knack apps is a great way to automate your workflow and keep your users up-to-date with reminders and notifications. In this article, we will walk you through the types of emails you can send from Knack, how to create and customize email rules, and where you can add emails.
There are typically two different types of emails you may want to send to your users: group emails and transactional emails.
Group Emails
Group emails are what you typically think of with newsletters and email blasts. Users have subscribed to your list or signed up for a service and have granted you permission to send them emails.
Knack is not designed for handling group or bulk emails well. To send group emails well you need unsubscribe links, spam prevention, delivery maximization, and other features in place to ensure proper delivery.
If you wish to send bulk or group emails to your Knack users, it’s recommended you use a 3rd-party service like MailChimp. You can follow this guide for setting up an integration between MailChimp & Knack: Using MailChimp. You can follow a similar process of exporting records to use with another group email service of your choice.
Transactional Emails
Transactional emails are used to send one-time emails to a limited number of recipients. Transactional emails are typically triggered by a specific action in your app or database. For example:
- A receipt is emailed to the customer and warehouse when an order is submitted.
- An employee is emailed when a job has been assigned to them by a manager.
- A manager is emailed when a project has exceeded a due date.
Knack has four features for sending transactional emails like this:
- Form Email Rules: add rules to a form to send custom email alerts based on criteria you define
- Grid Inline Editing Record Rules: add rules to grid columns to send custom emails when records are updated inline.
- Action Links: add links to views that trigger emails.
- Scheduled Tasks: schedule emails to be sent daily, weekly, or monthly. A scheduled email task will send one custom email per record matching your criteria.
Manage Email Rules in Forms
To trigger an email when the user submits a form, add an email rule to the form view.
A few examples of when you may want to send an email upon form submission:
- When an order form is submitted, email the customer with order details.
- When a project’s budget status is changed to approved, email the project manager.
- When a sales rep submits a new lead, email their sales manager.
Add an Email Rule
From the Pages section of the Builder, locate a form view. Hover over the view and click on the pencil icon to edit the view:
Click on the “Emails” tab in the left panel, then click the “Add Rule” button to add your first rule.
Edit Email Rules
The rule’s default action is to "Send a custom email for each record," meaning it will send a custom email that you can configure in the email editor. When you select the "Send a custom email" action, you gain access to all of the email rule customizations described below in the “Email Settings” section.
The other option is to "Send a basic email notification". This will send a simple email with all of the form data that was just submitted. There are no customization features here except the criteria and custom recipient.
If you need to edit an existing rule, simply go into the form view editor, make your changes, and click on the “Save Changes” button to apply the changes.
Delete Email Rules
To remove an email rule from a form view, open up the form view editor and click on the trashcan icon to the top-right of the rule. Don’t forget to click on “Save Changes”:
Manage Email Rules in Grids
Record rules can be used to send emails from grid views when inline editing is enabled. This will allow you to send or receive notifications when records are edited. For example, if someone changes a status in a grid view, a Manager could receive an email notifying them of the change.
You can enable inline editing from the settings section of the view editor.
Once inline editing is enabled, record rules can be added to specific grid columns by editing the column properties.
Manage Emails using Action Links
Action Links are a special type of link that you can add to details, grids, lists, maps, or calendar views. Action Links allow a Live App user to trigger specific actions behind the scenes with the click of a link on the view. These links can be used to update a record, update a connected record, insert a connected record or send a custom email.
Action Links can be found in any of the specified views, under the "Actions" tab when editing the view:
To send an email using an Action link, select the "Trigger an Action" option, then click the green "Add Action" button:
From there, select the "Send a Custom Email for each Record" option from the dropdown menu:
You can use record values for custom subjects and messages by clicking on the ellipses symbol, when available, and selecting the field from the menu:
Learn more about using Action Links in your app here.
Manage Email Rules in Task
To trigger an email automatically on a scheduled basis, add an email rule to your table's scheduled tasks section.
A few examples of when you may want to send an email on a scheduled basis:
- Email an employee connected to a deliverable when the due date is in a week.
- Email a customer to renew a warranty when the product’s warranty is out.
- Email a tenant a reminder to renew their lease when the lease expiration is 30 days out.
Add a Task
From the Tasks section of the Builder, locate the table that contains the records you want to send email notifications for and then click the green "Add Task" button:
Give your new task a name and set your desired schedule. Then, click the “next” button to proceed. The task’s default action is to "Update this Record." Change the action to “Send a Custom Email for Each Record” instead:
Edit the Email Rule
You now have access to all of the customization features of email rules. You can add criteria in the "when" section to target specific records:
See all your customization options in the “Email Settings” section below.
Delete the Rule
To remove an email rule triggered by a scheduled task, go to the Tasks section of the table and click on the ellipsis icon for the email rule. Select the "Delete" option from the dropdown:
Email Settings
Email rules can be sent from forms and scheduled tasks. Regardless of where you add them, email rules will have the same functionality: Criteria, From Name, From Email, Subject, and Message.
Criteria
Just like any other rule in Knack, email rules will trigger every time by default. In order to trigger the email only when specific conditions are met, click the “add criteria” link to add a filter. If you add multiple criteria, it means that all criteria must be met in order for the email to be sent.
Recipients
Every email needs at least one recipient. You can also add as many CC, BCC, and Reply-To recipients as you need. If you add a "Reply-To" recipient, they are going to receive any email replies straight to their email.
A recipient can be either a custom email address or an email field value.
Custom Email Address
This is self-explanatory, simply type a valid email address you’d like to send the email to. You can insert multiple recipients in a single line by adding a comma ( , ) between addresses.
An Email Field
Knack can send an email to an email address being stored in your record. Not only are you able to use any email field located in the source table, it can also access any email field located in a connected table, such as the connected user record.
If you choose an email field from a connected table and the connection is a many-to-one or many-to-many type, Knack will send one email to each of the connected records.
From Email
The from email is the email address being used to send the email, so your recipients are going to see that.
With SPAM and email spoofing becoming a bigger problem every year, companies are continuing to implement more and more strict rules around what emails they'll accept. Therefore it is imperative that you use an email address you actually have access to, since Knack is sending the emails "on behalf of" the email address.
Subject
Once recipients are added, it’s time to give the email a subject. Your subject can include field values in order to make it more informative.
To add a field value to your subject, click the “Add Field” button next to the subject input:
Message
The message editor can be used to type the body of your email. It’s a rich text field that offers some simple formatting options for fonts as well as the option to include an image or link.
To the left of the message editor you will find the list of fields for the source table. Simply click on a field and add it to your cursor’s current location. The fields will populate in the email with the form’s field values.
The list contains some special fields, such as Record ID. Emails in form views also include the Page URL/Parent Page URL field. Use these special fields to generate dynamic URLs that will direct the user to the record in the email.
Notes & Troubleshooting
Blank Email Address Fields
If an email is sent to a record with a blank email address field or the email address does not exist, the email will be redirected back to the form's "From" email address. The workflow is set up this way so that the owner of the app is alerted that an intended recipient has not received this email.
The email redirected to the app's email address will contain the header text of: "Returned to sender, no valid email recipient found. Please have your app administrator review the settings on this form".
Deliverability and Spam Folders
If you are having issues with the deliverability of emails or are finding that emails sent through your Knack app are ending up in customer's spam folders, you may need to get your domain on our email whitelist; please contact us at support@knack.com for instructions on how to get this set up.
This request allows us to add your domain to our whitelisted domains. Then, we verify your domain as a sending domain, meaning emails will be sent directly from your email address as opposed to "on behalf of" Knack.
Once you've sent in that request, we'll send back an email with three CNAME records that need to be updated in your DNS settings on your domain. This allows Knack, through SendGrid, to send emails on your behalf and be seen as "approved".
We do not have access to your CNAME records, it simply approves Knack to send emails generated through actions in the Knack app.
Halting Delivery
Once emails have been sent from a task or a form, it is not possible to halt their delivery to recipients. We encourage you to double check the "When" criteria before scheduling or manually running emails from tasks and saving a form's setup.