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
Solved! Go to Solution.
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.
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.
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
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.
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).
Now you can add the variable "varAccountID" to you notification.