“Each email recipient should get a different link to their request, how can I add this dynamic hyperlink to an email sent by Power Automate?”
When sending information emails, you probably don’t include all the information in each of them. You add the most important data to the email body followed by a link to the full item/request/folder. It’s easy to do if they’re fixed links, but what about dynamic links? How do you add a dynamic hyperlink? Use an output of a previous action as the link when the email editor won’t let you do that?
Add the link using HTML code
If the rich text editor won’t help, you’ll have to define the email in HTML code using the small button on the right side, the same approach as with Teams messages.
Yet defining the whole message in HTML might be a bit complicated for non IT people. That’s why you can do a small workaround.
Firstly, define the whole message using the rich text editor.
Secondly, use some dummy url address to highlight the places for the dynamic hyperlinks.
Thirdly, switch to the HTML code using the button on the right side and replace the dummy links with the dynamic contents.
And that’s it, you just added a dynamic hyperlink to the email message.
Revert the process to update the message
You might notice that once you use a dynamic content as a hyperlink, the switch between rich text and HTML will be disabled.
But it doesn’t mean that you can’t edit the message in the designer anymore. If you revert the process and replace the dynamic contents with another dummy address, you can switch it back.
Summary
Sending an email with dynamic hyperlink is not as easy as one might expect in Power Automate. You have the rich text editor to add links, but that one works only for fixed links. Once you have a dynamic hyperlink, using output of a previous action, you’ll have to switch to the HTML designer. Luckily you don’t have to design the whole message in HTML. You can prepare the message, use some url placeholders, and at the end switch to HTML and replace them with dynamic contents.
Hey,
Love your website which has helped me a lot, but on the topic of dynamic links using emails in PowerAutomate, I am stuck. As part of the approvals flow, I want to send out and email to the Approval requester in the case of either denied/approved. I the email I want to link to the sharepoint item, but I want to avoid sending the looooooong URL generated by just dumping the “link to item” dynamic expression tile into the email template. I have tried following your instructions with the HREF syntax in the HTML editor, but when replacing the URL in the HREF code (deleting the address between the “” with the link to item tile, it still doesnt work. What am I doing wrong?
Hello Jens,
hard to tell since I don’t know what exactly is happening in your flow, but if you put the url inside quotes after href= it should work.
Thank you SO much! You saved me with this solution!!