My aim is to create a looping workflow in SPD 2013 - this will send a daily summary email of a users active tasks.
There should be 1 email per user with tasks. So the REST query should be for unique users. Alternatively, no duplicate dictionary items.
My workflow would do:
- Step 1: use REST API to get a unique list of the users with actions
for each userID (removing all duplicate users) - [x] DONE: use REST API to get list of the active tasks for that user ID
- send email, repeat for next user ID
Can I use REST API to get a unique list of users with tasks?
This is where I got to with my REST url to get the user ID
http://website/test/_api/web/lists/GetByTitle('Tasks')/Items/?$select=AssignedTo/FirstName,AssignedTo/LastName,AssignedTo/Name,AssignedTo/Id&$expand=AssignedTo/Id
This is my REST API to get the list of actions by user Id
http://website/test/_api/web/lists/GetByTitle('Tasks')/Items/?$select=ID,Title,Body,DueDate,Created,AssignedTo/FirstName,AssignedTo/LastName,AssignedTo/Name,AssignedTo/Id&$expand=AssignedTo/Id&$filter=AssignedTo/ID eq 8
I suspect there is an easier way to get the list of users with active tasks.