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 / How to iterate emails ...
Power Automate
Answered

How to iterate emails by negative query? (e.g. "sender email Not EndsWith 'xyz' ")

(0) ShareShare
ReportReport
Posted on by 1

I want to apply an action on each email NOT containing specific text.

In p-code, it's something like:

 

 

 

 

for each email in <Get Emails V3> :
 if "From:" Not(EndsWith('xyz')) :
 create contact ( email=sender-email, category="abc" )

 

 

 

for each email in <Get Emails V3> :

   if "From:" Not(EndsWith('xyz')) :

        create contact ( email=sender-email, category="abc" )

 

I can't find out how to write the expression for Search Query field of Get Emails v3.

 

I'm new to Flow. 

Although i'm an excel power user, I can't find how to phrase the condition in Flow.

I couldn't (yet) find the relevant documentation / examples.

 

Thank you

Categories:
  • Verified answer
    Expiscornovus Profile Picture
    33,997 Most Valuable Professional on at

    Hi @abunamur,

     

    I think this would be possible by using a condition and the does not end with operator. Below is an example of how you could use this with the from field.

     

    doesnotendwith.png

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 426

#2
11manish Profile Picture

11manish 349 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 308

Last 30 days Overall leaderboard