https://www.sikich.com

Add a Hyperlink to an HTML table in Power Automate

INSIGHT 2 min read

Hyperlinks within HTML tables from emails generated from Power Automate can enhance the user experience and make your content more interactive. We’ll cover the steps needed to achieve adding a visual pleasing clickable link within an HTML table. This will allow users to be more efficient when interacting with these emails.

Note: Steps in this guide reference a previous article.

Step-by-Step Guide to Create Your Flow

  1. Create a Table (see “Using HTML Tables in Power Automate to Display Active Leads that Require Follow Up”)
  2. In the “Select” stage from the previous article, add a new line labeled “Link.”
how to add hyperlinks in Power Automate
  1. In the Link value, we need to add a concatenation expression to create our hyperlink.
  2. In the Dynamics 365 Sales Hub, select an existing Lead record, and copy the URL except for the record ID (the string of letters and numbers at the end of the URL)
  3. Add the URL to the expression below:
    concat('<a href="your lead record url not including the record ID',
    item()?['leadid'], '">Link to item</a>')
add the URL from the Lead record
  1. Now in the body of the email we need to add another expression that cleans up the format of the URL.
  2. Replace the Output that references the “Create HTML table” and add the expression below:
    replace(replace(replace(body('Create_HTML_table'), '&lt;', '<'), '&gt;', '>'), '&quot;', '"')
add the expression to "Create HTML table"
  1. Run the automation and review the result.
result of testing how to add hyperlinks to HTML tables from Power Automate
  1. Click the “Link to item” button and verify you are taken to the record.

Conclusion

With these steps, you can create a functional HTML table with hyperlinks in your automated emails from Power Automate, making your data presentation clear and interactive. Remember to test your email, created in Power Automate, thoroughly to ensure all links are working as expected.

Author

Alex is an Associate Consultant specializing in Microsoft Dynamics 365 Sales. He has worked with D365 for the past six months in Customer Engagement. Prior to that he was an Operations Manager for a small e-commerce company in Los Angeles, CA.