Sending email from a workflow rule

A workflow rule action can be used to send email each time a record is added, deleted, or updated.

 

Configuring Email

You can customize the email you send. Customization makes extensive use of variables. You can customize the following aspects of the email.

Send to: This is a comma-separated list of email addresses or expressions that yield email addresses.

  1. You can enter specific email addresses, such as JohnHughes@gmail.com. If you enter an email address that contains special characters such as hyphen or plus, you must enclose the email address in quotes, such as "John-L-Hughes@gmail.com".
  2. You can specify that the email address be taken from a field in the record that is being updated. For example, when a new order is captured, you may wish to send email to the customer who created the order. You can do this by entering an expression specifying the field name containing the customer's email address. For example, if there is a field called "CustomerEmail" in the updated record, you can specify [CustomerEmail] in the email address list.
  3. You can specify that the email address be taken from a field in a record that is referenced by the record being updated. For example, each of your Order records might contain a reference to a Customer record. Each Customer record might contain the customer's email address. When a new order is captured, you can send email to the customer who created the order. You can do this by entering the name of the Order record field that references the customer record, followed by the name of the Customer record field containing the customer's email address. For example, assume the name of the Order record field that references the customer record is CustRef, Assume the name of the Customer record field containing the customer's email address is CustEmail. You can specify the customer's email address by entering the expression[CustRef].[CustEmail] in the email address list.
  4. You can specify that the email addresses be taken from an entire column in another table. For example, you could create a table called PeopleToInform having two columns, Name andEmailAddress. Each time a new order is captured, you can send email to all of the people in the PeopleToInform table. Do this by entering the expression PeopleToInform[EmailAddress] in the email address list.
  5. When you specify multiple email addresses, you can include any combination of specific email addresses and expressions in the email address list. For example, you could specify the following email address list. JohnHughes@gmail.com,"John-L-Hughes@gmail.com",[CustomerEmail],[CustRef].[CustEmail],PeopleToInform[EmailAddress]

    If you specify an  expression that includes commas within it, we require you to proceed the expression with << and follow it with >>. When parsing a list of value, AppSheet assumes each individual list items is terminated with a comma. Commas appearing within the expression confuse the parser, because they appear to terminate the list item. Enclosing the entire expression in broken brackets, informs the parser that everything inside the brackets is part of a single expression.

Email Subject: AppSheet uses a default subject, but you can override that with your own subject text. You can include variables in the subject that are filled in by the values in the updated entry. Here is an example of a subject line: 'Thanks <<CustomerName>> for your order!'. 

Email body: You have three options when it comes to the body of the email. You can customize the email body field or add a body template (as described below), or simply do nothing and receive a default email that contains all of the values for the updated row.

Here's what it looks like if you do not choose to customize the email body or provide a body template:



You may specify a Body containing text, images, and variables directly in the Body attribute. After the variables are replaced, the result becomes the email body. Specifying the Body in this way works if you have a very simple email Body.

Body template: For more complex workflow email Bodies, you can specify a template file to use as the email body. You choose the template file from your cloud file system. We currently only support template files stored on Google Drive and the template file must be a Google Doc. In your template file you can include text, images, and variables. After the variables are replaced, the template becomes the email body. When a Body template is present, it is used in lieu of the “Email body”.

If you wish to specify a Body Template, you must include Google as a data provider. If Google is not already a data provider, you must go to Account>Data Sources and add Google as a data provider.

Attachment template: You can optionally specify a template file to use as an email attachment. You choose the template file from your cloud file system. We currently only support template files stored on Google Drive and the template file must be a Google Doc. In your template file you can include text, images, and variables. After the variables are replaced, the template is converted to PDF, and the result becomes the email attachment. 

If you wish to specify a Attachment Template, you must include Google as a data provider. If Google is not already a data provider, you must go to Account>Data Sources and add Google as a data provider.

Attachment Name: The name given to the email attachment. The default AttachmentName is “ChangeReport”. You may specify a different name and may include variables in the AttachmentName. 

Other Attachments: This is an optional list of one or more expressions that yield file names. This allows you to attach Image, Signature, Drawing, Thumbnail, or other Files.

This is often used by applications that take photographs and want to attach one or more photos to the workflow email. This can also be used to attach one or more existing PDF, Microsoft Word, or Microsoft Excel files, among others.

We simple attach the documents you specify to the email. We do not replace variables in these attachments, like we do for the Attachment template.

You can specify:

  • A file name such as MyPhoto.jpeg or MyWordFile.docx.
  • A simple column expression like [ImageColumn] or [FileColumn] where the file name is stored in the column.
  • A more complex expressions, like the de-reference expression [ProductRef].[ProductPhoto] . Here the file name is stored in the [ProductPhoto] column. 

CC: Email "CC value. May contain zero or more email addresses. Multiple addresses must be separated by commas. You can enter both specific email addresses and expressions as described with "Send to". 

BCC: Email "BCC" value. May contain zero or more email addresses. Multiple addresses must be separated by commas. You can enter both specific email addresses and expressions as described with "Send to". 

Reply to: Email "reply to" value. May contain zero or one email address. You can enter either a specific email address or an expression as described with "Send to". 

PreHeader: The default PreHeader value is "'<<_UPDATEMODE>> to application '<<_APPNAME>>' table '<<_TABLENAME>>' by '<<_USERNAME>>' at '<<_NOW>>'". This would yield a PreHeader such as "Update to application 'Workflow' by 'Julie Morgan' at 8/26/2015 6:12:28 PM". You may customize the PreHeader and may include variables.

 

Troubleshooting Email 

See this article.

 

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.