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
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
loopthat will contain all the daily logic and the
pause actionat 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
loopsegment 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.