Setting Recipients for Task

 

1 Set Recipients for Task
2 Dynamically Set Recipients for The Task
3 Set Recipients for Information Distribute Task

1 Set Recipients for Task

You can select recipients within the task, and once the task is completed, SQLMessenger will send the generated emails to these recipients. Recipients can be email recipients or Slack workspace members. SQLMessenger will automatically choose the appropriate sending method based on the recipient type.

Click to set recipients for the task

Add contacts to the recipient list

2 Dynamically Set Recipients for The Task

You can use variables to dynamically set the recipients for the task.

(1) Create a variable for the task

(2) In the "Select Recipients" dialog box, click the "From A Variable" button and choose the variable to be used as the recipient field

After configuring this, the task will use the value of the selected variable as the recipient's email address when it runs.

Tips:

If there are multiple email addresses, separate them with commas. For example, the variable value could be "addr1@my.com,addr2@my.com".

If querying the variable value from a database, the query result can also be multiple records, each containing one email address.

Multiple email addresses found

The email generated by the task

3 Set Recipients for Information Distribute Task

If the task is of the "Information Distribute" type, you can use the @@LoopData function as the recipient. During task execution, it will retrieve the corresponding field value from the task's associated record in the loop data (LoopData) and use it as the recipient address.

For example, your Recipient List(Loop Data) looks like the diagram below, with the "Manager Email" field containing the recipients' email addresses.

The Recipient List(Loop Data) of the task

You can set "@@LoopData(Manager Email)" as the recipients for the task in the Select Recipients dialog box.

Set "@@LoopData(Manager Email)" as the recipients for the task

When the task is executed, it will set the value of the "Manager Email" field in the Loop Data record corresponding to each subtask as the recipient of the email generated by that subtask.

The emails generated by the task

Use Variables to Dynamically Determine Message Recipients, Using Variables in Tasks