Which Power Automate Flow ran on my item?
In SharePoint Designer workflows it was easy to find your workflows, but how do you find your Power Automate flows in that relate to your item?
Troubleshooting Power Automate Flows
The previous posts in my series about troubleshooting flows in Microsoft are:
Have you had the same problem I’ve had? A user complains about a flow failing and you have no way of finding the failing flow. You might even try to rerun your flow but which one to pick?

The solution is now here!
I’m starting with the workflow function. I’m adding this function ins a Compose step



This gives me the following output.
{
"id": "/subscriptions/b1b36c61-d929-4258-8ace-6d31523e9820/resourceGroups/6300CD2A7667407C9251F30D77A6B805-030125C0AE7B4BC88A8A63602F20AB6A/providers/Microsoft.Logic/workflows/141e89fb-af2d-47ac-be25-f9176e64e9a0",
"name": "141e89fb-af2d-47ac-be25-f9176e64e9a0",
"type": "Microsoft.Logic/workflows",
"location": "uksouth",
"tags": {
"flowDisplayName": "Button -> Condition",
"environmentName": "07aa1562-fea6-4583-8d76-9a8e67cbf298",
"environmentFlowSuspensionReason": "07aa1562:2Dfea6:2D4583:2D8d76:2D9a8e67cbf298-None"
},
"run": {
"id": "/subscriptions/b1b36c61-d929-4258-8ace-6d31523e9820/resourceGroups/6300CD2A7667407C9251F30D77A6B805-030125C0AE7B4BC88A8A63602F20AB6A/providers/Microsoft.Logic/workflows/141e89fb-af2d-47ac-be25-f9176e64e9a0/runs/08586722084717816659969428791CU12",
"name": "08586722084717816659969428791CU12",
"type": "Microsoft.Logic/workflows/runs"
}
}
Ok the above is just a bit of json but this is actually very helpful stuff. Before looking further at the above json I’m going to have a look at the url of my flow history. That matches the above run:
https://unitedkingdom.flow.microsoft.com/manage/environments/07aa1562-fea6-4583-8d76-9a8e67cbf298/flows/141e89fb-af2d-47ac-be25-f9176e64e9a0/runs/08586722084717816659969428791CU12?backUrl=%2Fflows%2F141e89fb-af2d-47ac-be25-f9176e64e9a0%2Fdetails&runStatus=Failed
There are 3 guids that I need to find aso that I can build up the flow history url.
The first guid is my environmentName (07aa1562-fea6-4583-8d76-9a8e67cbf298), then I’ve got the flow name ( 141e89fb-af2d-47ac-be25-f9176e64e9a0) and finally the run (08586722084717816659969428791CU12).
Now all I need to do is update my triggering list item in SharePoint with the URL and I can find my flow history back!
The details steps can be found in part 2
This is fantastic, you are doing a great job.
A pity that workflow() does not return the flow’s status as well…
Not sure if that would work though. The workflow function gives you the details of the flow while it is running. Once a flow has failed the status will be succeeded or failed but then the workflow function can’t be running anymore. If one flow could collect the workflow details form another flow run then that would be great.