cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Mikaze
Level: Powered On

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

Hi,

 

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: 

if(equals(triggerBody()?['Email'],''),null,triggerBody()?['Email'])

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!
3 REPLIES 3
Super User
Super User

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

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!


Mikaze
Level: Powered On

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

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

2019_04_24_11_01_39_Window.png

 

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

Super User
Super User

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

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

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (4,671)