Skip to main content

Notifications

Community site session details
Power Automate - General Discussion
Answered

Flow ID

Like (2) ShareShare
ReportReport
Posted on 17 Jan 2018 15:51:26 by 197

So I have read of a technique to create a button in a column of a SharePoint list that will trigger a Flow when clicked.  This requires the flow to be set for "For selected item".  I have this flow set but one of the parameters to the code is the Flow ID, this should be a GUID.  For the life of me I can not figure out where to get this value from, any ideas?

 

Link to code: http://yannickborghmans.com/2017/11/14/start-your-ms-flow-from-within-the-new-sharepoint-column-formatter/

Categories:
  • HEATFreight Profile Picture
    1,020 on 24 Feb 2023 at 17:52:11
    Re: Flow ID

    You can do it dynamically within the flow itself using

    @{concat('https://make.powerautomate.com/environments/',workflow()['tags']['environmentName'],'/flows/',workflow()['tags']['logicAppName'],'/runs/',workflow()?['run']?['name'])}
  • GDanger Profile Picture
    4 on 24 Feb 2023 at 17:40:52
    Re: Flow ID

    I have been using this method for retrieving the flow id for a couple of years now.  I've just tried to create a button that triggers a flow from a SharePoint list and I no longer see the ID in the URL when in edit mode of the Flow.

    Now, the url only shows the default tenant ID and after the /logicflows. That's the extent of the URL. You now need to go to the Export option above the details section of your flow and select Get Flow Identifier.

     

    Thanks!

  • HEATFreight Profile Picture
    1,020 on 02 Sep 2022 at 16:06:07
    Re: Flow ID

    I have been trying off and on for maybe a year to figure out how to parametrically generate links to specific flow runs to include with the SharePoint records they edit so I can debug and troubleshoot far more efficiently, but I have yet to come up with anything better than hard-coding the URL, until now. Thanks again @NaveenkumarT !!

    Whole problem was I assumed the FlowId from the URL would be found in the workflow() output, and then I could figure out which parameter to use by CTRL+C and CTRL+F the FlowId from flow URL. But that assumption was bad since I was editing a flow in a dev environment. I gave up every time I tried to solve this issue. Turns out there was an internet time traveler from 2020 reaching out all along with the solution!

  • HEATFreight Profile Picture
    1,020 on 02 Sep 2022 at 15:35:48
    Re: Flow ID

    @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'])}

    HEATFreight_0-1662133773278.png

     



    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')}

     

  • NaveenkumarT Profile Picture
    Microsoft Employee on 03 Feb 2020 at 17:07:05
    Re: Flow ID

    Late reply, but this could be useful to someone.

    Use the below expressions.

     

    EnvironmentId - workflow()['tags']['environmentName']
    FlowId - workflow()['tags']['logicAppName']
    FlowRunId - workflow()['run']['name']

  • sandeepnmenon Profile Picture
    Microsoft Employee on 26 Nov 2018 at 06:57:52
    Re: Flow ID

    Is it available as some parameter so that I can use it in the actions?

  • MikeLockwood Profile Picture
    197 on 19 Jan 2018 at 15:24:45
    Re: Flow ID

    Mabel,

     

    Thank you so much.  I never even thought of looking at the URL.  I knew it would be something simple that I was overlooking.

     

     

  • Verified answer
    v-yamao-msft Profile Picture
    on 19 Jan 2018 at 09:48:29
    Re: Flow ID

    Hi @MikeLockwood,

     

    Thanks for updating.

     

    To get the Flow Id, in edit mode, you could get it from the highlighted part:

    3.PNG


    Best regards,
    Mabel Mao

  • sergeluca Profile Picture
    500 on 18 Jan 2018 at 20:04:57
    Re: Flow ID

    Hello Mike,

     

    to find the flow ID, go to flow and in the browser input bar, you will see something like this

    https://emea.flow.microsoft.com/manage/environments/Default-892b3446-d5f0-489e-a68d-605c1617aead/flows/b060f2b9-65ac-46d1-bee6-6ca4f54c03f8/details

     

    so here : b060f2b9-65ac-46d1-bee6-6ca4f54c03f8 is probably the flow id.

     

    Let me know if that works.

     

    Cheers

     

    Serge Luca

     

     

     

  • MikeLockwood Profile Picture
    197 on 18 Jan 2018 at 15:18:09
    Re: Flow ID

    Mabel,

     

    This is a simple question on how do i get the GUID ID of a specific Flow.  I would figure that the Flow board would be the best place for this question but I will post it in the SharePoint forum as well.

     

    Thanks,

    Mike Lockwood

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,743 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,079 Most Valuable Professional

Leaderboard