How to create hyperlink with dynamic URL in Power Automate emails.

Hello everyone and welcome to my blog. In today’s blog I will discuss about on how to create hyperlinks with dynamic URL while sending an email in Power Automate.

Let’s first understand the problem statement. Below is an instant flow I created for this demo.

I have created a variable varHyperLink with has the value of google home screen. In the next step I send out an email using the Send an email step.

Check for the email body where I have inserted the hyperlink. When I choose the Hyperlink icon, I get a popup to insert the Link Title and the Link Target.

I could not select any dynamic content inside the Link Target box. Hence I used the expression @variables(‘varHyperLink’). I save the flow and run it.

Unfortunately in the email the hyperlink is not inserted.

However if I go ahead and insert a static URL, I get the hyperlink.

So the issue is with dynamic values in the target. To accomplish that, switch to the code view in the email body.

You now have the HTML output of the email body. All you need is to create an anchor tag and set it’s href property to the dynamic value of the URL.

That’s it and now it works like a charm.

Hope you liked this post. If this post has helped, you can buy me a coffee.

For similar topics on Microsoft.NET and Power Platform, subscribe to my blog using the Subscribe option on right pane.

Debajit Dutta
Business Solutions MVP