I have a sharepoint list from which I need to create a flow to generate an Email containing the amount of times the person that the Email is being being sent to is on the list. Additionally one column contains a number which is attributed to that person. This number needs to be added to every subsequent number attributed to that person.

I.e. the list below should result in an email stating: "37466 You had a WDO 2 times with a total number 4 days"

I am looking forward to your help!

Many thanks,


enter image description here

  • When should the email be sent? once per day at a particular time of the day or more than once or weekly? – harshal gite Oct 5 '19 at 16:53
  • whenever a new item is added. the email in itself works fine, i am just struggling with the how to add "37466 You had a WDO 2 times with a total number 4 days" automatically part... – Tom Pranker Oct 6 '19 at 4:59
  • So, whenever a new item is created and a person is added, you want to count all the previous items with that persons name and add to your "n times" ? – harshal gite Oct 6 '19 at 7:14
  • what needs to be summed up is the days for a specific StaffID. Lets say I add StaffID 12345 with 3 days I need the flow to send staffID 12345 an email saying: " you had a WDO 2 times with a total of 5 days" (adding what is already in the list as per the screenshot) – Tom Pranker Oct 6 '19 at 9:36
  • Are you doing this using Designer workflow or MS Flow? – harshal gite Oct 6 '19 at 9:38

Use the actions shown below. and at the end add your action to send email and use the variables in your email string. enter image description here

Each action expanded 1. Get items matching the newly created item with same StaffId enter image description here

  1. Once you get the items, you will have your total count by calculating the length of items returned from previous action. Use this formula to assign it to your variable


enter image description here

  1. Initialize an integer variable which will store the total number of days.
  2. Use apply to each action and select "items" from get item in it.
  3. Add an action "increment variable" and add the below formula. This will add days of every item into the variable.


enter image description here

  1. use these variable in your email string.

Please up-vote and mark as answer if this solves your query.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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