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 Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Top Kudoed Authors
Users online (3,051)