Skip to main content

I have created a site workflow that will query a list, and send an email for each list item. The workflow is executing, but the email notifications are not being sent

2016-01-11_15-53-39.png

2016-01-11_15-51-53.png

2016-01-11_15-52-55.png

2016-01-11_15-54-11.png

2016-01-11_15-54-41.png

Does the worklow throw an error? I would assume, becasue varAccountId is just a sting and not a collection, this could be an issue.

To further analyze your workflow you should enabled verbose logging (both in CA and the workflow settings) and re-publish the workflow. You should the be able to inspect the value varCollQueryResults and check if the loop is ever entered.


Hi Jason,

It's worth checking to see you've got the smtp info set up correctly for Nintex. You can find this on SharePoint Central Administration under Nintex Workflow Management - Global Settings.

Jan


I created a new variable of type collection for the Account ID, and updated the notification email. Now I'm getting notification emails for each item, but the entire collection of Account Id's are being displayed in each email

2016-01-12_10-59-13.png

2016-01-12_10-57-08.png


Hi Jan,

   good idea, but we are receiving emails from other workflows without any issues.

Jason


Then I would suggest you look if the loop us actually entered.


Hi Jason,

well, that's obvious. If you add the collection-variable to the mail, the content of that collection will be send within the mail.

I suppose you want to send the Account Number corresponding to the current List-Item ...

... for that you would need to add a variable of type "number", I called it "varIndex". Then you change the for-each action to store the current index in this variable. This will hold the index-number of the Collection of IDs.

foreach.png

Next you wand to add a collection operation to the for-each loop. You use this action to retrieve from the Account Number collection the item at a given index and store the result in the variable "varAccountID" (of type text as for your first attempt).

collection.png

Now you can add the variable "varAccountID" to you notification.


I have applied the suggestions, but I'm getting the following error:

2016-01-13_11-44-17.png

2016-01-13_11-45-24.png

2016-01-13_11-47-12.png


Just before your For Each - check the count of your collection variable and log the count.


Sorry, my mistake. The for-each action should look like this:

foreach.png

And: you want to have the send-notification within the loop, to get an email for each line-item-


Your suggestions worked perfectly. laugh.png


Reply