criscles
Canvas Initiate

Email not being sent when collected as Variable

I have a simple workflow scheduled which collects data from a SharePoint list as variables. It runs a For Each action, pulling Collection variables and sending an email to the responsible parties.2-WF.png

I send an email to myself prior to the For Each action to test that the variables are being collected properly. The email Collection ( varCollTxtSendTo ) contains correct data - my email address in both cases.

1-Vars.png

 

 

 

 

In the Send an Email action at the bottom of the For Each set, I use the variable “varTxtSendTo” in the To: field. When I do this I receive NO EMAILS ( I am using my own email address to test in the Collection. )

4-BadSend.png

 

If I add my own name manually to the To: section in the "Send An Email" action I receive all the emails – in this case, 1 which contains the Variable Test, and 2 emails which are sent for each respective list item it runs on.

3-GoodSend.png

 

Can anyone explain why this is happening?

0 Kudos
Reply
8 Replies
SimonMuntz
Nintex Employee
Nintex Employee

Re: Email not being sent when collected as Variable

Hi,

Based on your screenshot of the test email the email addresses are separated by a a comma "," replace it with a semicolon ";"
0 Kudos
Reply
criscles
Canvas Initiate

Re: Email not being sent when collected as Variable

Hi @SimonMuntz ,

The email you see is representative of my collection of variables.

This is just a test to make sure they are being collected. This is not the email that goes to each respective list item.

As you can see, each of the Collection variables are separated by a comma.

0 Kudos
Reply
SimonMuntz
Nintex Employee
Nintex Employee

Re: Email not being sent when collected as Variable

So how are you separating the two names in the collection variable?
0 Kudos
Reply
criscles
Canvas Initiate

Re: Email not being sent when collected as Variable

@SimonMuntz, this is happening automatically. Below is the email that sends the workflow variables to me. Nintex for O365 concatenates data held in variables with a comma.

 Variables EmailVariables Email

The email in question is a part of the "For Each" action and should be picking one email address held in the variable "varCollTxtSendTo" based on my Count.

 

The "To:" section of this email pulls the data from the variable per Counted item, therefore containing only 1 email address to my understanding.

 6-ForEachEmail.png

 

If I insert my personal email in the "To:" field, I receive 2 individual emails properly. If I use the variable, as above, I receive no emails yet it is my email address (for the purposes of testing contained in a SharePoint list which populate the Collection. Head scratcher.

 

Note: I have also attempted "Select return type" to format the "To:" variable as "Email Address" to no avail.

0 Kudos
Reply
SimonMuntz
Nintex Employee
Nintex Employee

Re: Email not being sent when collected as Variable

Are you using the internal or external email service?
Why would you receive 2 individulal emails?
0 Kudos
Reply
criscles
Canvas Initiate

Re: Email not being sent when collected as Variable

@SimonMuntz, I am using internal email service at the moment. I have tried external email service with the same results.

 

There are 2 emails because there are 2 line items in my SharePoint list that I am using for testing.

 

Thanks for your help !

0 Kudos
Reply
SimonMuntz
Nintex Employee
Nintex Employee

Re: Email not being sent when collected as Variable

When you put the email address variable through the for each action have you logged what comes out the other side?
0 Kudos
Reply
criscles
Canvas Initiate

Re: Email not being sent when collected as Variable

@SimonMuntz, it's actually a very simple solution and it's based on user error. 😉 I am not actually Getting the Variable data for the email address in the For Each action. Thanks for persisting with me !

0 Kudos
Reply