Email
The Email node is used to trigger an email. Emails can be sent to a static list of recipients, or to a dynamic distribution list. Both the subject line and content of the email can be either static or dynamic text.
Email Properties
Display Name
The default display name of the for loop node is Email 1. Any subsequent for loop nodes are named according to this naming convention, with the appropriate numeric suffix, e.g. 'Email 2', ' Email 3', etc.
You can change the Email node name from directly from this field.
Description
You have the option to add a description to each for loop node; this can be a useful way of documenting the node for yourself and other users.
Send To
Insert a static or dynamic distribution list. Each given email address must be separated with a comma ",". Enable the 'Expression' option to send emails based on an expression; for instance, to send to a list of users stored in a variable.
Subject
Insert the email subject line. Enable the 'Expression' option to create a dynamic subject line using PQL.
Content
Write the email content. Enable the 'Expression' option to create dynamic content using PQL.
PQL Expressions
The Send To, Subject, and Content fields support both static and dynamic content. To create dynamic content, enable the 'Expression' option. You can construct a PQL expression by writing or pasting it directly into the field, or by opening the PQL Editor.
The Master Flow supports the use of the 'Common' PQL functions; when you open the PQL Editor, the Common PQL functions will be exposed, along with any variables that you've created within the flow.
To open the PQL Editor, click the PQL icon from the value's field.
- Click here to review documentation of the PQL Common functions.
- Click here to learn more about the PQL editor.
- Click here to learn about PQL syntax.
Example
In this example, three different emails are sent to different recipients using different methods. The first is sent to a user who was added to a variable called userName:
The email 'Send To' line references the user name variable and adds the email suffix to it. The Subject and Content are populated with other variables:
The second email is send using the UserName() PQl function coupled with the email suffix. The UserName function returns the user name of the current user, so this email will be sent to the current user:
The third email is sent to a list of emails that is stored in a variable. The variable uses a database query to return a list of all emails from the database:
The Send To field references the Emails variable, so the email will be sent to the list of emails stored in that variable: