cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Galvipa
Frequent Visitor

Trying to show text to a URL link in an email

I have a Sharepoint List that is populated from a MS FORM using Flow. There is a column that has a URL. I have my FLOW grabbing the items from the list and ading it to a table in an email. I have the email set to use HTML. When I create the table the URL is copied in fine and when the email is sent the link works. What I want to do is have text linked to the URL. For example; I want http://www.website.com/index/intro.html to look like this "Click Here". I added to the Sharepoint list <a href="http://www.website.com/index/intro.html>Click Here</a> and what get put into the table fo the email is "<a href="http://www.website.com/index/intro.html>Click Here</a>" code and all. The odd thing is that I can add the code outside of the table ane the it works. (pictures use a different url than my example)2019-08-06_16-14-21.jpg

Here is the flow part :

2019-08-06_16-18-09.jpg2019-08-06_16-18-43.jpg

2019-08-06_16-19-12.jpg

2019-08-06_16-19-41.jpg

Seems the HTML will not work in the table. even though the link will work. very odd. 

1 ACCEPTED SOLUTION

Accepted Solutions

 

Hi @Galvipa ,

 

Please try to insert a hyperlink in the HTML table by referring to the method mentioned in this blog.

https://alextofan.com/2019/02/14/flow-how-to-change-the-style-of-your-html-table-in-flow/

 

Best Regards,

Community Support Team _ Barry
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

9 REPLIES 9
RezaDorrani
Dual Super User II
Dual Super User II

Hi @Galvipa 

 

Use a compose statement to update the html table

replace(replace(replace(body('Create_HTML_table'), '&lt;', '<'), '&gt;', '>'),'&quot;','"')
 and then use it in email
 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

@RezaDorrani Thank you for the response... You mean this?

2019-08-07_12-29-44.jpg

RezaDorrani
Dual Super User II
Dual Super User II

Hi @Galvipa 

 

You have to add the text in Compose as an expression

 

 

Capture.PNG

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

MarkStokes
Skilled Sharer
Skilled Sharer

In your example text you don’t have double quotes at the end of the href attribute of the anchor tag.

Could it be as simple as that?

- Mark

Yes, I did catch that after I posted this. Thank you for the help though.

Galvipa
Frequent Visitor

Update: I added the compose Expression. I tried using it after the HTML table was created and also after the Customize HTML Table command. I made the column in the SP list to use enhanced rich text to see if that would help. This is what shows in the report in the table of the email. The compose command doesn't seem to change anything as you can see here: 

<div>&lt;a href=&quot;https://company.sharepoint.com/teams/group/Shared%20Documents/docs/ADFS_References.docx?d=w397d8rv0fc7a3cc6874fa9ce1437f5c9&quot;&gt;Wiki Link&lt;/a&gt;</div>

Here is the compose expression: 

replace(replace(replace(body('Create_Issue_HTML_table'), '&lt;', '<'), '&gt;', '>'),'&quot;','"')
Here is the current location of the compose command:
2019-08-08_10-09-42.jpg
Here is the value in Sharepoint looks like
<a href="https://company.sharepoint.com/teams/group/Shared%20Documents/docs/ADFS_References.docx?d=w397d8rv0fc7a3cc6874fa9ce1437f5ce">Wiki Link</a>

 

Hi @Galvipa ,

 

Please try to insert a hyperlink in the HTML table by referring to the method mentioned in this blog.

https://alextofan.com/2019/02/14/flow-how-to-change-the-style-of-your-html-table-in-flow/

 

Best Regards,

Community Support Team _ Barry
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

@v-bacao-msft That was it. Basically had to build the table from scratch. Create the STYLE object and call the values in a string variable.

2019-08-14_12-26-32.jpg

 

When adding the link just add the href to the line in the table string:
2019-08-14_12-28-20.jpg

The rest is explained in the link. Thank you very much for your help and everyone's input. 

abhi0698273
Regular Visitor

As It is observed, CreateHTMLTable converts < to &lt; and > to &gt; when reading data from array, as it considers < and > as a input data.
While to have <a> markup to work, replace approach works every time.

Example Table contains -

 

{
...
link : "<a href= \"https://samplelink.tonewplace.com/person\">click here</a>"
...
}

 

gets converted to something below due to CreateHTMLTable -

 

<tr>&lt;a href= &quot;https://samplelink.tonewplace.com/person&quot;&gt;click here&lt;/a&gt;

 

So, When we replace as said earlier
Example table becomes -

 

{
...
link : "::a href= \"https://samplelink.tonewplace.com/person\":;click here::/a:;"
...
}

 

After CreateHTMLTable, result is similar to  -

 

<tr>::a href= &quot;https://samplelink.tonewplace.com/person&quot;:;click here::/a:;

 

 

So, now using Compose to replace the combination of characters, used earlier -

 

 

<tr>::a href= &quot;https://samplelink.tonewplace.com/person&quot;:;click here::/a:;

 

 

becomes -

 

<tr><a href= &quot;https://samplelink.tonewplace.com/person&quot;>click here</a>

 

 

Now above result can successfully be used as part of email.  As we are not replacing any &gt; or &lt; there should not be any scripting issues.  however, a different combination can be used too (when :: or :; are part of original message to be shared)

 

This solution worked perfectly for me.😊

 

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

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

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,319)