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 send an email i...
Power Automate
Suggested Answer

How to send an email if an email address field is not empty

(0) ShareShare
ReportReport
Posted on by 776
I have a flow that will send an email to the email address that is in a SharePoint field, and that works fine, but I have a condition after that, where I check to see if a 2nd email address field in SharePoint to see if it is not blank. If it is not blank, then I send another email to that email address. Here is that part of the flow:

 
The Condition is as follows:

 
I keep adding 2 double quotes in the "Choose a value" field as follows:

 
It just keeps wiping out my 2 double quotes and gives me the following errors when I run the flow:
 
 
When I run the flow, I get the following error message:
 
Action 'Send_an_email_(V2)_3' failed: Bad Request - To Field cannot be null or empty
 
I believe this is associated with the "Send an email (V2) 3" action, but it shouldn't hit that action unless the fields are not blank. Do I need to handle my condition differently?

Lastly, If the condition is False, meaning there is no value in those fields, the flow should end and so, it the value is False, I just have no actions. Should I put in an action to end the flow?
I have the same question (0)
  • Suggested answer
    eetuRobo Profile Picture
    4,535 Super User 2026 Season 1 on at
    Yes the problem is in you condition. It doesn't go to the false when there is no email in the value.
    I suggest you use length() -expression. So check if the length of the value is greater than 0



    so length(outputs(AdminAssistantValue)) is greater than 0. Then if its empty it will never be greater than 0 and if it has email in it then it
    will be more than 0.
    https://learn.microsoft.com/en-us/azure/logic-apps/expression-functions-reference#length

    Or you could try to check if its not equal to empty string


    or null


    You can put Terminate -aciton to the False side or if there are no actions after the condition then you don't need to add that since if the condition goes to false there should be no actions for the flow to do
  • Greg27 Profile Picture
    776 on at
    @eetuRobo,
     
    I tried your first request:


    and received the following:

     
    Any thoughts?
  • Suggested answer
    Kalathiya Profile Picture
    2,129 Super User 2026 Season 1 on at
    Hello @Greg27,

    Add a condition before sending the email and compare the SharePoint email field to null using an expression.

    Expression:

    null

    Condition example:

     
    ------------------------------------------------------------------------------------------------------------------------------------------------------------------
    If this solution fixed your issue, please mark it as the verified/accepted solution.
     
    📩 Need more help? Mention @Kalathiya anytime!
    ✔️ Don’t forget to Accept as Solution if this guidance worked for you.
    💛 Your Like motivates me to keep helping.
  • Suggested answer
    eetuRobo Profile Picture
    4,535 Super User 2026 Season 1 on at
    Hello @Greg27

    Here is simple and short videos on the length function that might be helpful:
    https://www.youtube.com/watch?v=Si18I7AQqNU
    https://www.youtube.com/watch?v=o82Xp_beM0o

    You wrote plain text instead of function/expression. So right now your condition checks if that text "length(AdminAssistant-2)" is not equal to 0. It will not check the length just compares if the text is number 0.



    You need to use length expression. Also the "AdminAssisstant-2" and "AdminAssistantEmail-2" should be the dynamic values you used in your condition originally.
    So you need to wrap them inside the length() -expression.


    Here's how to do it:
    When you want to use expressions (like length() you were trying to) you need to first select the expression button


    Then this window should open:


    There are all the functions lister or if you just start writing a function it should suggest available ones.
    1. Write "length()" and put your cursor inside the brackets
    2. Select "Dynamic content"
    3. Select the "AdminAssistant" dynamic content you want to check the length of



    So then it should look something like this. Note: do not write the same text that I have inside the length() -function. Select the correct dynamic content you have.


    Then just press "Add" and the condition first value should have that "length(...) x" icon (you can see whats inside it if you hover over it or click it)
  • André Arnaud de Calavon Profile Picture
    629 on at
    Hi Greg,

    Are both fields AdminAssistant-2 and AdminAssistantEmail-2 empty, or only one of them? With the AND operator, it check for both fields.
  • CU30121719-0 Profile Picture
    on at
    Just use the empty() function in the condition.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 801

#2
Valantis Profile Picture

Valantis 602

#3
Haque Profile Picture

Haque 581

Last 30 days Overall leaderboard