Hello,
Happy new year!
I create a flow to "send an email when an item is created or modified", the thing is required the flow to run only when a specific status field is changed to "send" and I need the flow to run only if the change is made by a specific user (flow owner), that's because many people have access to this List, and want to avoid to fire the flow by other users who edit information on list by mistake.
1. When an item is created or modified
2. Send an email
Trigger Conditions:
1rst: When a status field is modified to "Send" (which actually runs correctly)
2nd: When the modification was made for a specific people (not all Share Point users). I found from dynamic content "Modified by email" so I got the following Trigger Conditions:
@equals(triggerOutputs()?['body/Editor/Email'], 'danna.yenisei.morales.delgado@bd.com')
its important to mention that the condition formula was obtained by using "Filter Array" and by clicking in "Edit in advanced mode"
The second Trigger condition is giving me trouble, I give the screen for the flow asking for your help
I really appreciate your help as soon as possible
The dynamic content options are the following:
Hi @Danna
The expression looks ok to me. To debug try to remove the first condition and see whether that works. Also check the email returning from flow are all in same case (Captial or Small). Make sure there are no spaces in between the conditions.
Thanks
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogHi @abm thank you for the soon response,
I tried only with the 2nd condition to see if works, but unfortunately it doesn't work....
Then I tried something different, the following condition and get the same result ...the flow doesn't run:
When: Modified display name - is equal to - Created by display name
@equals(triggerOutputs()?['body/Editor/DisplayName'], triggerOutputs()?['body/Author/DisplayName'])
Finally I tried other:
Modifed by Display Name - is equal to - Name
@equals(triggerOutputs()?['body/Editor/DisplayName'], 'Name')
And the flow run 😀..I will make more testes tomorrow to be sure the flow fire only with my user name and confirm you if it was solved
Regards,
Hi @Danna
Thanks for your reply.
Also try using the AND operator as in one expression.
@and(equals(triggerOutputs()?['body/Editor/Email'], 'test@test.com'),equals(triggerOutputs()?['body/GlobalHoldStatus/Value'],'Send'))
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blog@abm,
Sorry the delay response, I was making tests.
Thank you very much for the support and the last formula, was very useful.
I just have only one doubt, hoping you could help me:
- Regarding the formula suggested which works very well, is it possible to have 2 emails, in this case, how could be re-configured the formula? I mean set a condition to the flow to run only when (specific two people made the change and status change to "Send")
@and(equals(triggerOutputs()?['body/Editor/Email'], 'test@test.com'),equals(triggerOutputs()?['body/GlobalHoldStatus/Value'],'Send'))
Regards,
Danna
Hi @Danna
You may need to apply the OR condition here.
@and(@or(equals(x,x),equals(y,y)),equals())
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogThank you @abm,
Yesterday tried to set the new condition, but doesn´t work, I review the parenthesis but I cannot find the mistake, the Flow checker does not let me save with the new condition. I write here detailed, hoping yo u could find the solution:
@and(@or(equals(triggerOutputs()?['body/Editor/DisplayName'], 'Complete Name'),equals(triggerOutputs()?['body/Editor/DisplayName'], 'Complete Name2')),equals(triggerOutputs()?['body/GlobalHoldStatus/Value'],'Send'))
Thank you very much!
Hi @Danna
Try the below
@and(or(equals(triggerOutputs()?['body/Editor/DisplayName'], 'Complete Name'),equals(triggerOutputs()?['body/Editor/DisplayName'], 'Complete Name2')),equals(triggerOutputs()?['body/GlobalHoldStatus/Value'],'Send'))
Thanks
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogThe first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Announcing a new way to share your feedback with the Power Automate Team.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
68 | |
23 | |
17 | |
16 | |
13 |
User | Count |
---|---|
121 | |
35 | |
33 | |
28 | |
26 |