web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Link to Cloud Flow Run...
Power Automate
Unanswered

Link to Cloud Flow Run History

(0) ShareShare
ReportReport
Posted on by 29

Is there a way from within a cloud flow to get the URL to the Run History for that flow?

 

I'd like to be able to email it if a Scope fails.

Categories:
I have the same question (0)
  • Mira Ghaly Profile Picture
    11,413 Moderator on at

    @RussellR 

    Please try the below expression in a compose Data Operation

    concat('https://emea.flow.microsoft.com/manage/environments/',workflow()['tags']['environmentName'],'/flows/',workflow()['name'],'/runs/',workflow()['run']['name'])

     

  • Verified answer
    v-bofeng-msft Profile Picture
    on at

    Hi @RussellR :

    You can use the API to create a custom connector to get the running history of Flow:

    https://emea.api.flow.microsoft.com/providers/Microsoft.ProcessSimple/environments/{environment_name}/flows/{flow_name}/runs

    Thanks to @StefanS365 for the perfect solution, the following are some key steps:

     Step1: Add the Activity.Read.All and Flows.Read.All permissions

    1.JPG

    Step2: Download and import the swagger file for the custom connector.  And then Enter Client Id, Client Secret and Resource URLhttps://service.flow.microsoft.com/

    6.JPG

    2.JPG

    The Result

    4.JPG

    Please click this link to read StefanS365's article.

    If you are new to creating a custom connector, please watch this video

    Best Regards,

    Bof

     

  • RussellR Profile Picture
    29 on at

    Thanks all. Big help. I'll come back and Accept solutions once I have tested and implemented.

  • Lucian Profile Picture
    256 on at

    Hi @v-bofeng-msft 

     

    Indeed the solution posted by @StefanS365 is very helpful to get the flow runs, but is gets only first 50 runs.

    I saw the JSON body has a "nextLink" value, but I did not figured out how to use it to get the rest of the runs.

     

    Is there a way to get the rest or more exactly ALL of the runs?

     

    Kind Regards,

    Lucian

  • SimonSays Profile Picture
    168 on at

    Here's how I solved this. The key was to initialize a variable (nextLink) and set it to the API URL, then add a Do Until loop to call the API and set the nextLink variable to the value returned from the json.

     

    Screenshot 2022-06-01 204121.jpgScreenshot 2022-06-01 204225.jpg

  • Nicolás_Mendoza Profile Picture
    2 on at

    Hey all, I am trying to use the api but my enviroment name and flow name have spaces and parenthesis (for example: My comapny(version: 1). How do I need to encode or put the url so I can call the webservice?

     

    Thanks

  • santi_95 Profile Picture
    77 on at

    When you make the request using the nextlink it comes back as a bad request. Are you authenticating here? Even setting this up as a regular HTTP request it doesnt work.

     

    Had anyone been able to figure this out?

  • powerappsdevelo Profile Picture
    2 on at

    Hey santi95, you'll need to authenticate similarly to the 1st request.

    I suggest you to wrap it within a customConnector and do subsequent calls if there are more than 50 runs. For your connector, just add another query param for the $skiptoken. Just be mindful of the last character it adds to that 'nextLink' which is an encoded = (%3d). 

  • Jose Ramon Profile Picture
    107 on at

    This post is old and you may not remember it, but I need to check the last execution of a non-solution flow, do you know how to get it? this solution works, as long as the flow is in a solution or you are the owner/co-owner, otherwise, it fails with Status Code 403 and message: ConnectionAuthorizationFailed.

     

    The caller object id is 'xxxx-xxx-xxx-xxx-xxxx'. Connection 'xxxx-xxxx-xxxx-xxxx-xxxx' to 'shared_logicflows' cannot be used to activate this flow, either because this is not a valid connection or because it is not a connection you have access permission for. Either replace the connection with a valid connection you can access or have the connection owner activate the flow, so the connection is shared with you in the context of this flow.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 523 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 406 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard