Views:

Question:
In a workflow, how can I reference a keyword field that contains a list of email addresses for use with an Email Send step?

Answer:
Please refer to the following guide for instructions on sending emails based on a list of email addresses contained in a keyword field. 

The following is an outline of a workflow, and the steps involved where a keyword field contains a list of email addresses, then is iterated through so that an email is sent for each entry in the keyword field.

We'll need the following global variables created;

Text Data Type

  • Email

Integer Data Type

  • Count

  • Total


1. The first step is to create an Assign data step where we first initialize the Count global variable and give it a fixed value of 0.

Workflow global variable = Count = Fixed entry = 0


2. Next, we'll create another Assign data step where we set our 3 global variables.  

Workflow global variable = Email = Arithmetic Expression = DW_KW_NAME[GV_Count]
Workflow global variable = total = Arithmetic Expression = COUNT(DW_KW_NAME)
Workflow global variable = Count = Arithmetic Expression = GV_Count+1




For the "Email" global variable, we're going to grab the first email address stored in the keyword field.

This is accomplished by using this arithmetic expression (DW_KW_NAME[GV_Count]) when we first reference our keyword field. Next to it, we're referencing our Count variable, which was set to 0. 
In this case, 0 corresponds to the first line of the keyword field.  



For the "Total" global variable Arithmetic expression (COUNT(DW_KW_NAME)), we're using the Count function. We're also providing the keyword field as our parameter to return a total count of the number of email addresses stored.


Finally, the "Count" global variable Arithmetic Expression (GV_Count+1) is incremented by 1. 



3. After initializing the global variables and updating the Count global variable, we proceed to the Email Send step, which will send out the email.


4. Now, a Condition step will be used to check if there are any remaining email addresses to which an email should be sent.
If there are, it will loop back to the second Assign data step and then repeat the process above.



5. Once all email addresses have been sent, the workflow will end. 
This is a simple case, but the logic should be able to be implemented in any workflow you have setup.

KBA is applicable for both Cloud and On-premise Organizations.

Comments (0)