cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

Send email when column value has changed

Hi, I am hitting a brick wall with this issue. Hopefully it is something simple that I have missed.

 

We have a list on SharePoint where one of the columns on the list is a simple yes/no choice. I want the flow to send an email to specifc people when this column is changed from no to yes.

 

I read some articles about triggers so I started playing about with that. Here is the flow (with the trigger below the flow - the trigger is applied to the 1st step in the flow):

 

flow 1.pngflow 2.png

 

 

 

 

 

 

 

 

 

 

 

 

The column name is 'processed by finance'.

 

The flow fails by timing out and suggests that the test action wasn't carried out so it doesn't really give me any errors. It does however send me an email (from me to me - even though I specified a different account to send from) and it shows the following:

 

flow 3.png

 

 

 

So it does kind of work but not in the way I want it to.....

 

Any suggestions appreciated.

 

Thanks

Gary

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Dual Super User III
Dual Super User III

Re: Send email when column value has changed

Hi!

I believe there are a couple of problems with the expression triggerbody()?['Processed by finance']

First, you are not using the column internal name (the one needed by flow), second your column is of type Yes/no... or a choice with two possible values (either Yes or No).

 

My suggestion is to replace the trigger condition logic temporarily and move it into a 'Condition' action block just after the trigger, so it will be easier for you to debug it.

Once removed, you need to figure out what your type of column is: either Yes/no or Choice with two possible values. If you are not familiar with SP config, you can figure it out by adding a dummy action block just after the trigger, assign as its input the Column... from dynamic content menu and if you hover your mouse over it, you will figure out its internal name. NExt add a Terminate action block. Reexecute the flow and inspect Compose's output. If 'Yes/No' I believe it is a multichoice, if 'true/false' I believe it is a Yes/No column.

 

NExt, you can replace 'Terminate' action block and add to your Condition action. O the left side of your Condition rule,assign the Column from Dynamic content menu. NExt select operator 'is equal to'. Now on the left side of the condition rule, if we are dealing with 'Yes/No' column add either the following WDL expression

true

...but if Choice column add the following text

Yes

 

So once you have the answer to these questions clear and test successfuly your flow, you can try again removing 'Condition' action block and adding 'trigger condition' instead. If so please take into account:

If the SPField is Yes/No type column, the trigger condition expression should be as below:

@@equals(triggerBody()?['InternalSPFieldName'],true)

If the SPField is choice type column, the trigger condition expression should be similar to:

@equals(triggerBody()?['InternalSPFieldNAme']?['Value'],'Yes')

 

Hope this helps

 



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



View solution in original post

3 REPLIES 3
Highlighted
Dual Super User III
Dual Super User III

Re: Send email when column value has changed

Hi!

I believe there are a couple of problems with the expression triggerbody()?['Processed by finance']

First, you are not using the column internal name (the one needed by flow), second your column is of type Yes/no... or a choice with two possible values (either Yes or No).

 

My suggestion is to replace the trigger condition logic temporarily and move it into a 'Condition' action block just after the trigger, so it will be easier for you to debug it.

Once removed, you need to figure out what your type of column is: either Yes/no or Choice with two possible values. If you are not familiar with SP config, you can figure it out by adding a dummy action block just after the trigger, assign as its input the Column... from dynamic content menu and if you hover your mouse over it, you will figure out its internal name. NExt add a Terminate action block. Reexecute the flow and inspect Compose's output. If 'Yes/No' I believe it is a multichoice, if 'true/false' I believe it is a Yes/No column.

 

NExt, you can replace 'Terminate' action block and add to your Condition action. O the left side of your Condition rule,assign the Column from Dynamic content menu. NExt select operator 'is equal to'. Now on the left side of the condition rule, if we are dealing with 'Yes/No' column add either the following WDL expression

true

...but if Choice column add the following text

Yes

 

So once you have the answer to these questions clear and test successfuly your flow, you can try again removing 'Condition' action block and adding 'trigger condition' instead. If so please take into account:

If the SPField is Yes/No type column, the trigger condition expression should be as below:

@@equals(triggerBody()?['InternalSPFieldName'],true)

If the SPField is choice type column, the trigger condition expression should be similar to:

@equals(triggerBody()?['InternalSPFieldNAme']?['Value'],'Yes')

 

Hope this helps

 



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



View solution in original post

Highlighted
Regular Visitor

Re: Send email when column value has changed

Amazing! Worked a treat! Thank you so much! I've left the condition section in as I think this will be easier for me (and other users) to see what is going on.

 

I've now hit another stumbling block.....

 

I had another flow that emailed certain staff members depending on the values of columns - this worked ok. I now want to add this process into the yes condition. I've basically dragged and dropped this flow into the yes condition thinking that this would do the trick. I'm now seeing this error:

 

condition.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Basically, I've set it to email certain people when certain columns have certain values (departments basically). As mentioned earlier, this part works ok in it's own flow - I'm thinking that I'm missing something that needs pulled through from a previous step, could be wrong tho....

Highlighted
Regular Visitor

Re: Send email when column value has changed

Don't worry about this, I think I've figured out what is wrong.

 

Thanks again!

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Kudoed Authors
Users online (7,092)