Add Dynamic Hyperlinks in Emails Sent by Microsoft Power Automate

By - August 14, 2020

Microsoft Power Automate is a powerful tool with many capabilities to help automate your business processes. By using Microsoft Power Automate’s flows, you can easily alert Salespersons, Dispatchers, and more regarding changes to a Microsoft Dynamics 365 (D365) record that might require attention. Including a dynamic link to the record in question can greatly increase your workforce’s productivity. This way, users can navigate to the record with one click, as opposed to referencing a record ID and manually searching for it within D365. In this article, I will outline the steps needed to create a dynamic hyperlink to a D365 record.

Create a dynamic hyperlink

First, you will need to build your flow to complete the expected action. Create a trigger based on when a specific field on a record is updated. Use a ‘Get Record’ step to retrieve data related to the record you are interested in. You will also need to write up a draft of your email.

In the following example, I will be creating a dynamic link to a Work Order record in field service.

  1. Use the ‘Initialize variable’ action to create a variable to store your concatenated link. In this case, we are creating a link to the work order.
  2. Use the ‘Set variable’ action to set the value of the variable. Paste the static part of the link directly into the Value box. Then, use the dynamic ‘WO Number’ field from the ‘Get Record’ step, which will be the unique GUID for the specific work order.

You can retrieve the static part of the link from your browser. Simply open a work order (or record of your choosing), and copy up until the specific record identifier.

  1. You can reference the variable directly in the body of the email, and it will include the full link as plain text.

Hyperlink the dynamic link

If you would like to take it a step further, you can hyperlink text to the dynamic link you just created!

  1. In order to do this, you will have to edit your email using the HTML editor. Click here:
  2. If you already wrote the main points of your email in the classic editor, you will see some generic HTML formatting such as paragraph and break tags. Leave these as-is.
  3. To add a hyperlink to text simply place the following line in the body of your email:
    <A HREF="insert_dynamic_variable_here">Click Here</A>

 

You will need to replace ‘insert_dynamic_variable_here‘ with the concatenated link that you stored in a variable in the steps above. You can also replace the ‘Click Here’ text with whatever you would like the clickable text to say.

That’s it! You’ve successfully set a dynamic link to your record. Your email should look something like this:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Receive Posts by Email

Subscribe and receive notifications of new posts by email.