0
votes

I have a Microsoft Flow which triggers whenever a sharepoint list item is updated. I wanted to add a trigger condition such that the flow should not trigger IF a specific user updates the sharepoint item.

I found 2 below expressions from multiple sources online, but both doesn't seem to work.

  • not(equals(triggerBody()?['Editor']?['Email'], 'my-email-id'))
  • not(equals(triggerOutputs()?['body/Editor/Email'],'my-email-id'))

both the above expressions throws below error when I try to save my flow:

ERROR:

The power flow's logic app flow template was invalid. The template condition expression 'not(equals(triggerOutputs()?['body/Editor/Email'],'my-email-id'))' at line '1' and column '9858' is not valid template language expression.

Can someone please help me fix this expression? :)

1

1 Answers

0
votes

Trigger condition:

 @not(equals(triggerOutputs()?['body/Editor/Email'], 'user [email protected]'))

I test in my SharePoint Online. When the trigger is set to "When an item is Created or Modified", after the item is modified, the flow will run and Modified By filed will be the flow connection owner. So the trigger condition does not work.

In other words, although you set the trigger condition, the control itself also has its own trigger condition and the level is higher than the trigger condition you set.

You can try to the below workaround:

1.Create a "Person and Group" column named "Editor" in the list

enter image description here

2.Create the following flow: When Editor account email is equal to "user [email protected]" not send email.

enter image description here

Here is a similar case for your reference: