web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Trigger Conditions - O...
Power Automate
Answered

Trigger Conditions - Or expressions

(1) ShareShare
ReportReport
Posted on by 17
I'm trying to set trigger conditions for a flow. The flow is triggered on a Sharepoint: When an item or file is modified condition. I want to set the trigger such that it fires as long as the editor of the change isn't one of five people. I thought that I'd gotten the right expression worked out, but after testing overnight, turns out the trigger condition wasn't filter anything thing out, including 12 items that were edited by one of the five people included in the expression below (Names replaced with Last,First for posting).
 
@or(not(equals(triggerBody()?['Editor/DisplayName'],'Last, First')),not(equals(triggerBody()?['Editor/DisplayName'],'Last, First')),not(equals(triggerBody()?['Editor/DisplayName'],'Last, First')),not(equals(triggerBody()?['Editor/DisplayName'],'Last, First')),not(equals(triggerBody()?['Editor/DisplayName'],'Last, First')))
 
Appreciate any insight!
Categories:
I have the same question (0)
  • Suggested answer
    stampcoin Profile Picture
    5,148 Super User 2026 Season 1 on at
     
    You can try this one :
     
    not(
        contains(
            createArray(
                'user1@example.com',
                'user2@example.com',
                'user3@example.com',
                'user4@example.com',
                'user5@example.com'
            ),
            triggerOutputs()?['body/Editor/Email']
        )
    )
     
  • Ivey West Profile Picture
    17 on at
     
    I'm getting a The power flow's logic app flow template was invalid. The template condition expression 'not( contains( createArray( 'example@example.com', 'example@excample.com', 'example@example.com', 'example@example.com', 'example@example.com' ), triggerOutputs()?['body/Editor/Email'] ) )' at line '1' and column '1105' is not valid template language expression.
     
     
    Edit: CoPilot tweaked the expression to what's below, but the expression still allowing the condition to be trigger even with one of those email addresses.
     
     
    @not(contains(createArray('email1', 'email2', 'email3', 'email4', 'email5'), triggerBody()?['Editor/EMail']))
     
     
    Edit 2: Unless Test/Automatic bypasses the trigger condition? Because it didn't work in testing, but now seems to be that I've turned it on....
  • Verified answer
    stampcoin Profile Picture
    5,148 Super User 2026 Season 1 on at
    thanks for the feedback.
    How did you use this ?
     
    see below if use it in condition.
    Left = 
    createArray(
                'user1@example.com',
                'user2@example.com',
                'user3@example.com',
                'user4@example.com',
                'user5@example.com'
            )
    right = triggerOutputs()?['body/Editor/Email']
  • Ivey West Profile Picture
    17 on at
     
    I think the issue was on my end. I had the flow turned off and was testing past runs that included one of my specific editors, and they were going through. 
     
    The minute I turned the flow on and started testing with live data, it seems to be working. 
     
    This was the expression formatting that worked for me (essentially what you gave me the first time, compressed down to one line since I can't expand the input field. 
     
    @not(contains(createArray('email1', 'email2', 'email3', 'email4', 'email5'), triggerBody()?['Editor/EMail']))
     
    I've got to get some more live data -- probably on Monday -- to flow though, but I'm assuming I'll be able to mark as suggested answer then. Thanks again, that's twice you've saved my bacon this week!
  • stampcoin Profile Picture
    5,148 Super User 2026 Season 1 on at
    Sure, that's sound great.😊,
    Feel free if you get a question.
  • stampcoin Profile Picture
    5,148 Super User 2026 Season 1 on at
    Have you got a chance to check it ?
  • Ivey West Profile Picture
    17 on at
     
    Yes, but still working through some issues. Is the trigger condition input case sensitive?
     
    I have one user whose email is all caps for some reason; and hers are still leaking through. I’ve put the expression in a compose action, and it’s resolving as true, but hers are still running through the flow. 
  • stampcoin Profile Picture
    5,148 Super User 2026 Season 1 on at
    The email address is case sensitive, so please use 
    toLower()/toUpper() to format the addresses.
  • Poweruser811 Profile Picture
    36 on at
     
    I'm having the same issue. But I only have 1 email that I want to exclude. How can I use this expression for 1 user? Thank you!
    @not(contains(createArray('email1', 'email2', 'email3', 'email4', 'email5'), triggerBody()?['Editor/EMail']))

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 612

#2
Valantis Profile Picture

Valantis 344

#3
11manish Profile Picture

11manish 326

Last 30 days Overall leaderboard