How to get dynamic Record URL in Power Automate (quick tip)
How to get dynamic Record URL in Power Automate
There seems to be some amount of confusion on the web about how to use Power Automate to get the dynamic record URL of a record in Dynamics CE.
Power Automate comes with a few onboard tools. To understand what we are talking about here. A typical Dynamics CE URL, here for an opportunity record, might look like this:

If you want to create this URL inside a Power Automate flow, for example, to put it inside an approval e-mail you need to think about how to do it.
For example, you can parse the JSON output of an action to get the URL of the Dynamics instance:

The body part contains many technical details that are exchanged inside the flow while it is running. Among them is also a URL. This output can later be used with an expression like uriHost(body('GetOpportunity')?['@odata.id']) can be parsed. From this you will get the following URL:
https://org18eb47a1.crm4.dynamics.com/. However, what is still missing is the App ID and the GUID of the record to assemble the link.
If you search the net on how to assemble this link dynamically you will find a few sources that follow two approaches. The first approach tries to determine all important components (Dynmics URL, App-ID, and GUID) with flow board means, while the second approach relies fully on JavaScript. However, both approaches have a fundamental disadvantage. They (often) assume that the components of the link that are between those "core" elements do not change. Likewise, these solutions are valid but still somewhat of a "tinker".
So our goal is something like this:

Well, there is a simple trick to get to this link. This one uses good old Dynamics CE onboard tools. What to do here, at least that would be my suggestion, is:
1.) Create a new field (I called it "RecordURL").
2.) Set up a "Real-Time" workflow on the corresponding entity (Important NOT run workflow in the background - It has to be the real-time one!)
3) Whenever changes are made to the record (for example, when saving), the dynamic URL is written into this field.
4) Using this field in Power Automate

We can now use this field in our Approval Flow. Whenever an approval email is being sent, the person will receive a direct link to the record:

This screenshot also shows that these days you can forget about hyperlink formatting, as this is done by the tool for you. So let's check if this one works out:

Because Sales is probably the most obvious case for approval processes, I have created a simple approval process as an example here.
This checks if the amount is above 3 million USD and if the approval status is not "Yes". After the user hits save the flow is triggered and contains the URL to the record:

When I click on the link I get directly to the record. And this is more or less it. If you have trouble building this do not hesitate to reach out to me. p.s: sometimes it is a good idea to check the "good old" onboard things :-)
How to get dynamic Record URL in Power Automate
Published on:
Learn moreRelated posts
How to Automate Document Signing with DocuSign in Power Automate
Introduction In an earlier Inogic post, “Streamlining E-Signatures in Multi-Step Forms with Power Pages and DocuSign Integration”, Our previou...
Power Automate Retry and Error Handling Patterns for Reliable Power Pages Integrations
When Power Pages integrates with Power Automate, reliability becomes key. Portal users expect instant responses — whether submitting a form, u...
Handling Large Files in Power Automate
Power Automate can handle large files, but how large? SharePoint Online supports files up to 250 GB, which sounds generous until you try movin...
UTCNow and that little hidden feature in Power Automate
If you have been following my posts on SharePains.com, then you will know about the UTCNow function generating the current UTC time. But did y...
Understanding Binary and Base64 in Power Automate
If you work with Power Automate and deal with files, you’ve encountered issues saving them. If you see things like “String/bytes i...
How to Auto-Fill Third-Party Web Forms Using Power Automate Desktop and JavaScript
In today’s digital workflows, teams across HR, operations, finance, and support deal with repetitive manual tasks every day. One of the most c...
How to Design Custom Approval Buttons in Outlook Email Using Power Automate (Step-by-Step Guide)
Microsoft’s standard approval emails make it easy to send and capture user feedback directly through Outlook. However, one major limitation is...
We need to talk about... Power Automate... Licensing
Next in my blog, I am going to cover a topic that has come up several times in recent conversations with clients.....Microsoft Licensing! part...
Flows getting triggered multiple times / missing callbackregistration record – Power Automate / Dataverse
Recently, we observed that one of our flows was getting triggered multiple times in our UAT environment; however, the flow was working properl...
Power Automate – Information about ‘Retry with AI vision’ functionality in Power Automate for desktop
We are announcing the introduction of the Retry with AI vision feature in error handling for UI and browser automation within Power Automate f...