@NaveenkumarT I have a manually triggered flow in an unmanaged solution in my dev environment. Both the EnvironmentId and the FlowRunId are included in the workflow() output and both match their corresponding workflow() key values, tags.environmentName and run.name, respectively.
My issue is that tags.logicAppName does NOT match the FlowId as shown in the URL!
I have noticed that workflow()?tags.logicAppName is the same value as workflow()?name. Is that supposed to be like that or why does my logicAppName not match the value of flows/<FlowId> in the URL?
_____
Oh wow, I spoke too soon... I have just tested this and the non-matching logicAppName still works! I believe the reason for the difference has something to do with this being a dev environment. I forget what the setting is called but it's different for my dev vs. prod environments, and, for instance, that changes the length of the GUID for flows and whatnot. Prod flows seem to have shorter GUIDs. If you compared a prod flow's logicAppName and flows/<FlowId> values, maybe they would match, unlike in the dev environment. Regardless, you can use the logicAppName value even if it does not match the URL. Previously I had gone looking for the correct parameter by CTRL+F'ing my flows/<FlowId> value, but that was fruitless in the dev environment. Learn something every day!
EDIT: Just because someone else out there might find my use case helpful, here's the solution I devised (with help from Naveen!) to populate a column of clickable hyperlinks which open the last flow to edit a record.
First, you'll need to add a hyperlink column, call it FlowRunURL. Edit your flow and add a Compose action in Power Automate to parametrically create the URL string using workflow() parameters instead of hard-coded strings (like I was doing before I read this thread):
@{concat('https://make.powerautomate.com/environments/',workflow()['tags']['environmentName'],'/flows/',workflow()['tags']['logicAppName'],'/runs/',workflow()?['run']?['name'])}

Then create a SharePoint HTTP PATCH request, with the following headers (this assumes your record exists. you may need Method:POST and different headers if creating a new record):
{
"content-type": "application/json;odata=verbose",
"IF-MATCH": "*",
"X-HTTP-Method": "MERGE"
}
And create a compose action which you'll use for the HTTP PATCH Body ('Workflow' is the name I gave to the compose action which creates the URL string):
{
"__metadata": {
"type": "SP.Data.<Name of your list goes here>ListItem"
},
"FlowRunURL": {
"Description": "click to open last flow to edit this record",
"Url": "@{outputs('Workflow')}"
}
Then just make sure to put the output of that compose action as the Body parameter for your HTTP PATCH request, like so:
@{outputs('ComposePATCH')}