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.

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.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (5,573)