About sending emails
Adding email alerts to your Knack apps is a great way to automate your workflow and also keeping your users up-to-date.
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.
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 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
Types of emails Knack can send
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.
To send transactional emails, you can use Email Rules in either form views or scheduled tasks.
About Email Rules
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 1 To 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
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 the Connection Field is a many-to-one or many-to-many, Knack will send 1 email to each of the selected 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 email 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 offers some simple formatting options for fonts, as well as the option to include an image.
To the left of the message editor you will find the list of Fields for the source Object, simply click on a Field and Knack will add it to your cursor’s current location.
The list also contains some special fields, such as RECORD ID. 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.
Email Rules in Forms
To trigger an email when the user submits a form, add an Email Rule to the Form View.
Add an Email Rule
From the Pages 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.
Select an action
The rule’s default action is to "Send a basic notification", meaning it’s going to send a quick email with all of the Form data that was just submitted. There are no customization features here except the criteria and a custom recipient.
In order to access all of the Email Rule features, change the Action to "Send a custom email"
Customize the rule
If you selected the "Send a custom email" action, you should now have access to all of the Email Rule customizations described above.
Email Rules in Tasks
To trigger an email automatically on a scheduled basis, add an Email Rule to your Object’s Tasks.
Add a Task
From the Data 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.
Select an action
The task’s default action is to "update all records"; change this to “send a custom email for each record” instead.
Customize the rule
You now have access to all of the customization features of the Email Rule. Don’t forget you can add criteria in the When section to target specific records using Email Rules.