Email not being sent when collected as Variable

  • 28 February 2020
  • 8 replies
  • 82 views

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.6602i40EFA7181FB8AA55.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.

6601iF513F33D78156170.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. )

6599iC1862F5C952E66C6.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.

6600i206C9024AC994F31.png

 

Can anyone explain why this is happening?


8 replies

Userlevel 6
Badge +22
Hi,

Based on your screenshot of the test email the email addresses are separated by a a comma "," replace it with a semicolon ";"

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.

Userlevel 6
Badge +22
So how are you separating the two names in the collection 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.


 


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.


 


 


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.

Userlevel 6
Badge +22
Are you using the internal or external email service?
Why would you receive 2 individulal emails?

@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 !

Userlevel 6
Badge +22
When you put the email address variable through the for each action have you logged what comes out the other side?

@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 !

Reply