2

I have a list of employees and columns of 10+ training courses they have to complete annually. I need to send out reminder emails when they are due but there could be more than 1 employee due a course on one day or one employee could have more than one course due on one day or lots of them could be due more than one course on one day. My workflow comes back with it will only return 1 result. How can I get it to check the whole list and send more than email reminder out. Thanks in advance

2 Answers 2

1

You could create the workflow that runs every day, checks for due courses and sends the appropriate emails to employees.

Easier said than done, of course. :)

How to do this:

  • Create the site workflow in SharePoint designer.
  • Add the loop that will contain all the daily logic and the pause action at the end of the loop segment (set pause for 1 day).

The logic should contain the following:

  • Call the SharePoint REST api to get all the due courses for the day. (This article shows how to call the web service from workflow and this article shows how to create the query using SharePoint REST api).
  • Add another loop segment which should go through all the results of the REST api call, and send the appropriate emails.

Depending on your data structure the queries could be more or less complex.

This is the high level picture of what should be done. It should be enough to start putting all the pieces together. After finishing the workflow, you should need to start it manually the first time, and it should run without ending.

0

You can create console application and schedule that console application inside widow task scheduler for onpremise and azure for online.It will run everyday and fetch all items from list then implement your logic and use SharePoint Utility.sendmail function for sending mail.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.