E-Mail notification when file modified except when I modify it
Good afternoon,
I am attempting to create a flow to send me an e-mail notification whenever someone modifies an excel document, except I do not want an e-mail when I make the edits. This is how I have it lined up:
Bold & Italic = dynamic content
Trigger - When a file is created or modified (properties only)
Condition - "Name" is equal to "Schedule.xlsx"
- Condition 1 - Modified by Email is not equal to "******@here.com"
- Send an email (V2) To: "******@here.com" Subject: File Name with Extension was modified by Modified by DisplayName
When I remove Condition 1, everything triggers correctly. I used this for reference: How to receive specific file modification notifications
Thank you for your assistance.
1 answer
-
Hi @Richard,
Based on your sharing, you have followed correctly the guide from the reference article and the current structure of your Power Automate flow is good. However, you said that when removing Condition 1, everything triggered correctly. Can you share what exactly happens when you add Condition 1 into your flow? What wrong with the outcome when using the Condition 1?
Based on my understanding, if you use Condition 1, every change from others except you will send an e-mail notification. Without condition 1, it will send an e-mail notification even if you are the one who make changes.
Please understand that my initial response may not always resolve the issue immediately. However, with your help and more detailed information, we can work together to find a solution.
Thank you for your understanding and cooperation. I look forward to hearing from you.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
-
Richard Mair 0 Reputation points
Sorry for the confusion, I didn't describe the issue with the end state.
When Condition 1 is in place, I receive no e-mail traffic, including when other people make a change.
When I remove Condition 1, I receive e-mail traffic when anyone makes a change, including myself (which is what I would expect).
I have attached a screenshot of the expression, the blacked-out e-mail format is first-dot-last at organization.state.gov, so pretty straight forward.
-
Hendrix-C 17,580 Reputation points • Microsoft External Staff • Moderator
Hi @Richard,
If that's the case, I suggest you use a trigger condition:
- Keep your trigger as "When a file is created or modified (properties only)"
- Select the trigger > Settings > scroll down to Trigger conditions
- Add this expression into it:
@and(equals(triggerOutputs()?['body/{FilenameWithExtension}'],'Schedule.xlsx'),not(equals(toLower(coalesce(triggerOutputs()?['body/Editor/Email'],'')),'******@here.com')))- This trigger only runs for your file Schedule.xlsx and skips the run if the editor's email is your email address.
- After that, your flow can go straight to Send an email (V2) step. In short, your flow only needs two steps: Trigger > Send an email (V2)
You can try this approach and let me know if it works. If not, please notify me and we can work together to find a solution.
Thank you for your patience and understanding. Hope to hear from you soon.
-
Richard Mair 0 Reputation points
Sweet sweet victory. We ran it a few times and that did the trick. Thank you for your help!
Sign in to comment -
