I'm new to this - hope i am posting to the correct area.
I created a simple PowerAutomate flow which sends and email notification under a certain condition. I have a list of users that submit users suggestions. Each row (each user suggestion) has 5 or 6 columns, including Requestor (email address) and Status. My flow was set up to send an email notification to the Requestor, If his/her Status Value changed to a specific value. So, the basic logic/rule is as shown below:
IF (Status Value) is changed to (specific Status Value), send email notification to (Requestor)...
I built 3 flows - one for each specific Status Value. I tested it them and they worked great - I changed the value a few times and it only sent the email notification when the Status Value = one of my chosen values (i.e., "In Development" or "Need More Information" or "Scheduled for Development"). However, I also found out later that the flows will send email notifications when any column value in the other columns changes while my Status Value = (one of my specific values). So, a user will get a notification when his/her Status value changes to In Development (which is correct behavior), and will also get a notification when any of the values in the other columns change while his/her Status Value is = In Development (this is not correct behavior). This seems to be a bug in the logic...not sure how to fix it...
Are you using just major versions on your list (hopefully as makes it much easier), or minor versions too? Need to know this in order to build the flow how you want (only if the Status changes).
Also, you said you built three separate flows, one for each of the Statuses. Is that just because the email you send out is different depending on the Status, or some other reason? If so, then could quite easily build just the single flow and still get what you're after.
Hello, grantjenkins, and thanks for responding! I don't know which version - it is a part of the MSF 365 Online for a branch of the Federal Government. Is there an easy way to check I tried looking for "About" or "System" in Power Automate and in MSF 36 Online, but was not successful - I am not a technical user and somewhat clueless on many things).
Also, yes, I am building 3 simple flows because the email notification message to each status has a unique email message.
Does this help?
Working on it now. Just to confirm - is the Requestor column in the SharePoint List of type Single line of text, or is it a Person column?
@darrendather I've got what I think you're after.
For this example, I'm using the following list. Note that the email (Requestor column) is stored in a Single line of text column. Note that it's important that you have set Major versions on the List.
And for Status, I've setup the following choices, with the default value being Pending.
Below is the full flow. I'll go into each of the actions.
And the Switch cases.
I've used When an item or a file is modified so it doesn't trigger the flow when the item is initially created - only when an existing item is modified.
I've also set the trigger to run ONLY when the Status is one of the values you mentioned. To add a Trigger Condition, click on the three dots ... on the trigger, then select Settings.
Then add a new Trigger Condition using the following expression, then click on Done.
@or( equals(triggerOutputs()?['body/Status/Value'], 'In Development'), equals(triggerOutputs()?['body/Status/Value'], 'Need More Information'), equals(triggerOutputs()?['body/Status/Value'], 'Scheduled for Development') )
Because we only want to do something when the item is initially set to one of the choices (not based on some other column change), we need to see if the Status column itself changed. To do this we can use Get changes for an item or file (properties only), passing in the previous version number. The expression used to get the previous version number is:
Next, in our Condition, we can check to see if the Status has changed since the last version and the current version.
If it hasn't changed, the flow will end. But if it has changed, we can continue to check what the Status Value is within the Yes branch.
In our Yes branch, we check to see what the value of Status Value is and have three Cases dependent on what the value is. If the Status Value is In Development, it will use the first Case. If the Status Value is Need More Information, it will use the second Case, etc. And within each Case we have a different email Subject and Body specifically for that Status.
Hopefully this is what you're after. You'd need to change the SharePoint column names to suit exactly what you have in your List, but other than that everything else should just work.
@darrendather Yes - I meant history versioning.
Keep up to date with current events and community announcements in the Power Automate community.
A great place where you can stay up to date with community calls and interact with the speakers.
Check out the latest Community Blog from the community!