Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Filling outlook email or not depending on other variable when creating a contact



I'm building a flow to create a new contact on Outlook. I am receiving the data from another source, and in this first source, sometimes there is no email to add. I tried adding this code to the "Email addresses Address - 1" cell of my flow when creating a contact: 


However, if the email is empty, I get this error: 

"message": "The e-mail address that was supplied isn't valid.\r\nclientRequestId: 01135e52-fe6a-4822-935c-c0d5d57d4e8f\r\nserviceRequestId: 1d1e9ac4-2b6d-4d3e-85b2-e3d6180df2e3",
If I had to check whether the email is there or not just once, I would use a condition block, but I have to check in different parts and flows and I thought I could find something easier to use in all of them. Is there an easier way to do it?

Thank you!
Resident Rockstar
Resident Rockstar

Hi @Mikaze , thank you for your post.

Whilst I think i get the gist of what you are doing and trying to acheive it'd be easier if you could post a picture of your complete Flow. Please can you do that?


Also, if some of your email fields may be blank , or empty ... try something like the below perhaps:

if(equals(not(empty(triggerBody()?['Email'])), true), triggerBody()?['Email'], '')

If you have found my post helpful, please mark thumbs up.


Any other questions, just ask.


Thanks, Alan

Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!

Thank you for your answer, @AlanPs1! I took a screenshot of that part of my flow, here is the image:



I tried your code and it didn't work, I get the same error message. 

Resident Rockstar
Resident Rockstar

Hi @Mikaze ,

With this one, please can you post the full Flow in pictures.

You are on Apply to each 3 and trying to call the email address from the trigger so i'm keen to know the trigger and what comes before etc before I advise what I would do.


Thanks, Alan

Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!

Helpful resources

Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Top Kudoed Authors
Users online (11,003)