I would like to be able to link through to a specific flow instances run history (for those with permission to access it) for troubleshooting purposes. It would be great if a direct link to an instances run history could be created maybe with an action or just be a persistent constant in the dynamic content. This could then be added to an email that triggers when a flow has failed to prevent you having to find the failed instance in the run history.
To this link you need the the LogicAppName and Run instance ID. You can get these values from the workflow() function. Here is how I have been able to accomplish this:
Declare a variable of object type, wfFlowObj
Set this variable to the workflow() function.
This will return a JSON object like this one
To get the vaules you need, we need Parse this JSON object, using the wfFlowObj output as payload to generate the schema.
Declare anothe variable of string type, runLink
Now we need to construct the link URL, which is as follows:
We can now construct this URL using the dynamic values from our PARSE_JSON Step
At this point, you can use this variable as you wish.