How to query a list every day to send an email with a list of users based on current date

  • 30 August 2017
  • 3 replies
  • 1 view

Badge +4

Hello,

We are going through our Windows 10 migration. We have a list of users with an anticipated migration date. I would like to query that list once a day to send an email to our department with a list of users who are due for migration the next day. I just need someone to point me in the right direction and give me the design on how to accomplish this. I appreciate any assistance, thanks!


3 replies

Badge +16

in the below example I send an email for every item returned:

but you could use a site workflow, scheduled to run daily, that queries the list for items where date = (current date + 1) and store the filtered users into a collection and then email that collection to your team?

Badge +4

Thanks so much for this! It's working perfectly. However, I have a different issue. How would I convert a collection variable of user names to a friendly display name? They are coming in as their login names prefixed with i:0#.w|

Badge +16

OK you can add an additional step in

  • create a new variable (type person or group) in your workflow (mine is called vPersCreatedBy but yours might be vPersUser)

  • Inside your for each, use set variable action to set your person variable to the current item in the loop from the collection and return display name (use ... to choose how to return the value)

then use that in your email notification?  does that make sense?

Reply