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 Automate
Unanswered

Flow ID

(2) ShareShare
ReportReport
Posted on 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:
I have the same question (0)
  • v-yamao-msft Profile Picture
    on at

    Hi @MikeLockwood,

     

    It seems that you are trying to use column formatting to customize SharePoint. I would suggest you submit this issue on the SharePoint forum to get the most qualified response:
    https://social.technet.microsoft.com/Forums/Sharepoint/en-US/home?category=sharepoint

     

    How is your flow created? If you have issues on using Microsoft Flow, please feel free post back.

     

    Best regards,
    Mabel Mao

  • MikeLockwood Profile Picture
    197 on at

    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

  • sergeluca Profile Picture
    500 on at

    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

     

     

     

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

    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

  • MikeLockwood Profile Picture
    197 on at

    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.

     

     

  • sandeepnmenon Profile Picture
    Microsoft Employee on at

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

  • NaveenkumarT Profile Picture
    Microsoft Employee on at

    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']

  • HEATFreight Profile Picture
    1,024 on at

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

     

  • HEATFreight Profile Picture
    1,024 on at

    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!

  • GDanger Profile Picture
    4 on at

    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!

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 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard