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 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 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.
To send transactional emails, you can use email rules in either form views or scheduled tasks.
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 the form view and click it to access its settings.
Click on the “Emails” tab in the left panel, then click the “Add Email” button to add your first rule.
Edit Email Rules
The rule’s default action is to "Send a basic notification," meaning it 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.
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.
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 red minus sign next to the rule. Don’t forget to click on “Save Changes.”
Send Emails using Action Links
Action Links are a special type of link that you can add to details, tables, 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 "Links" (or "Special" tab if you are using a details view) when editing the view.
To send an email using an Action link, select the 'Send a Custom Email' option for your action, then edit your email. You can use record values for custom recipients, subjects, and messages:
Manage Email Rules in Task
To trigger an email automatically on a scheduled basis, add an email rule to your object’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 Data section of the Builder, locate the object that contains the records you want to send email notifications for.
Click the “Tasks” tab in the object menu, then click the “Add Task” button to add your first task.
Give your new task a name and set your desired schedule; click the “next” button to proceed.
The task’s default action is to "update all records." 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 object and click on the trash can icon for the email rule.
Email rules can be sent from forms and scheduled tasks. Regardless of where you add them, email rules will have the same functionality: Criteria, Recipients, From Email, Subject, and Message.
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.
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 object, it can also access any email field located in a connected object, such as the connected user record.
If you choose an email field from a connected object and the connection is a many-to-one or many-to-many type, Knack will send one email to each of the connected records.
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.
Knack Tip: If you’re on the Pro plan, you can verify your domain as a sending domain, meaning emails will be sent directly from your email address as opposed to ‘on behalf of’ Knack. Click here to verify your domain
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:
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 object. Simply click on a field and to 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
- 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".
- If you are having issues with 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 email@example.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.
- 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.