cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JTischler
Helper II
Helper II

Email to send only if a field contains a user

First let me state that I have users modifying and creating list items using PowerApps.  That may be the reason for my issue....

 

I have a flow that sends an email when a list item is created or modified.  I have this flow looking to a field that is populated by user/group selector.  I only want the email to send if the field is populated with a username, else no email.

 

The flow works perfect when field is populated with a username, the problem is that it still sends the email even if I update the form and leave the field blank.  What's even more confusing, is that when I submit the change and remove the user through power apps, the user is now repopulated in the field.  This was not happening prior to the flow.  I am assuming that somehow the flow forces the last good value back in to the field?

 

My next thought was to trick the flow (HA!)..  I created a formula that basically says if field has a value, use email.  Else blank/bogus address:

 

coalesce(triggerBody()?['Notifyofupdate_x0028_COorLA_x002']?['Email'],'null@null.com')
 
This didn't work either.  How can I get this flow to only send an email if the field has a user identified?
 
25.08.2021_13.53.34_REC.png
0 REPLIES 0

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,460)