cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

add object to expression

Using flow I'm composing an html based Outlook email.

I need to add a nicely formed URL based on an IF condition in the body of the email

The url I've formed in a "Compose Action" -  <a href="@{body('Get_item')?['DocumentPortal']}">Doc Portal</a>

I've written the expression -  if(not(empty(body('Get_item')?['DocumentPortal'])),'Please see the following link:','no')

My problem happens when I try to insert my Compose in the TRUE side of my if statement.  What is the proper format?  Can I even do what I envision?

I'm grateful for your time.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-yamao-msft
Community Support
Community Support

Hi @Anonymous,

 

Do you want to insert a link into the email body based if it is not empty?

I assume that there is a Hyperlink column in the list.

I have made the following test, please check it for a reference.

In the Compose action, configure the URL likes below.

In the send an email, insert the following code:

if(not(empty(triggerBody()?['DocumentPortal'])),concat('Please see the following link:',outputs('Compose')),'No')

1.PNG

Hope it could be your reference.

 

Best regards,

Mabel

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-yamao-msft
Community Support
Community Support

Hi @Anonymous,

 

Do you want to insert a link into the email body based if it is not empty?

I assume that there is a Hyperlink column in the list.

I have made the following test, please check it for a reference.

In the Compose action, configure the URL likes below.

In the send an email, insert the following code:

if(not(empty(triggerBody()?['DocumentPortal'])),concat('Please see the following link:',outputs('Compose')),'No')

1.PNG

Hope it could be your reference.

 

Best regards,

Mabel

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (93,337)