0

I am trying to build a flow to trigger a custom email sent once a SharePoint list item is created or modified, condition is to only send it if a choice value in a certain column is set to "YES".

I add the list item, the column stays as "NO", email doesn't send. Perfect.

Couple of hours later, I modify the list item, the column still stays as "NO", email doesn't send. Perfect.

Next day, I edit the list item again, change this particular column to "YES", the email sends. Perfect.

Like I say, it's working. My issue is STOPPING the email being sent again as soon as only one email has been sent. Once the column is set to "YES", it will never be set to "NO" again.

Because I would normally go in and out of the list item at various times, I need some way of stopping the email being sent if the value was already "YES" before modifying the list item.

I tried using trigger conditions in "when an item is created or modified" setting but it triggers mail even when that particular column is not being modified but was previously set to "Yes".

Kindly suggest how can this be acheived. Thank you!

1
  • What will be the default value of the choice column when an item will be created ? Is it is possible to have a choice value = Yes on item creation ? Jun 22, 2020 at 16:20

1 Answer 1

1

You can overcome sending an email repeatedly by following logic :-

  1. Create a new column(you can hide it from list view) as Choice column having choices 'Yes' and 'No', say it as IsEmailSent? (Set Default value = 'No')

  2. Then in flow , check below condition before 'Send an Email' action -

If IsEmailSent == 'No' && YourChoiceColumn == 'Yes' .

  1. Add your action to 'Send an email' .

  2. Add action to update list item and set IsEmailSent= 'Yes'.

By this, email will send only once.

9
  • Thank you very much, Diksha. it worked. :) I have one more requirement where the user might change this column to "No" and then again set to "Yes". Is there any way to trigger an email every time this particular column is modified to "Yes". Thanks once again.
    – HRY
    Jun 22, 2020 at 19:12
  • 1
    You're welcome @HRY. Please accept the answer if it worked for you. The answer to your new requirement is - Before updating the list item in flow , check condition - If YourChoiceColumn == 'No' , then set IsEmailSent? == 'No' else if YourChoiceColumn == 'Yes' , then set IsEmailSent? == 'Yes' Jun 23, 2020 at 5:08
  • Thank you very much, Diksha, it worked. :)
    – HRY
    Jun 23, 2020 at 6:40
  • Great. You're welcome @HRY :) Jun 23, 2020 at 7:10
  • Hello @Diksha, not sure why but MS flow is triggering email twice even when the item is modified only once. do you have any idea why is it triggering twice, I can see it in the run history.
    – HRY
    Jun 24, 2020 at 7:39

Your Answer

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

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