cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
towergr
Frequent Visitor

Trigger condition to exclude specific user

Hoping someone can help me accomplish this. Here's the scenario:

Paperwork gets scanned and saved to a folder in a SharePoint document library.  I have a "When a file is created in a folder" Flow setup to send an email with the document attached when it's added to the library. The Flow works fine but I'd like to add a trigger to prevent it from running if the file is created by a specific user. Here's the Flow as is:

 

towergr_0-1621349324845.png

towergr_1-1621349380698.png

No trigger conditions are currently defined. Is there a way to do this?

 

Thanks!

2 REPLIES 2
tom_riha
Super User II
Super User II

Hello @towergr ,

you can check the email of the author and trigger the flow only if it's not equal to some email address.

@not(equals(triggerOutputs()?['body/Author/Email'], 'name@email.com'))


[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]
towergr
Frequent Visitor

Hi Tom,

 

Thanks for the tip. I could not find the correct formatting. I added the trigger. Now sometimes the Flow fails. Not always, but maybe 50% of the time. And even if it lists a successful run, I'm still getting the emails even if the file was created by the excluded user. Here's the error:

towergr_1-1621368859185.png

 

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Kudoed Authors
Users online (2,455)