Forum Discussion

Gareth Jayne's avatar
Gareth Jayne
Copper Contributor
Jan 11, 2019

Flow button in Modern Document Library Web Part

Hi everyone

 

I am working on a modern Team Site.  I have followed the instructions here to create a button in a document library to run a flow on a specific document, and this works perfectly in the library.  However, I also have a page where there is a document library web part and I want users to be able to run the flow using this button from this page.

 

This doesn't seem to be possible as the button does nothing when clicked on the web part.  From what I've read it doesn't look like there's any workaround for this so I wanted to double check that no-one else has found a way around it.  These pages show multiple document libraries so I don't really want to have to ask the users to go into each library every time they want to run the flows.

 

I'd be grateful if anyone has any pointers or has come across this issue themselves.  Thanks in advance.

  • bynum's avatar
    bynum
    Iron Contributor
    Just wanted to add a voice that I discovered this same limitation myself today (list web part doesn't fire the flow, but the flow does run when you're in the context of the list view within the list). Hope for a resolution soon!
    • mgrif0's avatar
      mgrif0
      Copper Contributor
      The URL to run a flow is almost the same as the URL to edit the flow.
      If the Edit URL is:
      https://<region>.flow.microsoft.com/manage/environments/<environment guid>/flows/shared/<flow guid>/details
      Then the Run URL is:
      https://<region>.flow.microsoft.com/manage/environments/<environment guid>/flows/shared/<flow guid>/run

      Just change the /details to /run.
      Now, it doesn't launch as smoothly as you would hope, but it DOES work in a web part. You may also need to work with it to get it to pass any details of the item you want it to run against. i.e. pass in parameters from the list item.
      • ishchupak's avatar
        ishchupak
        Copper Contributor
        Can u elaborate, how to use it inside List WP, company disabled embedded WP, besides, I need List WB to be connected to other lists on the page
  • I followed the same Microsoft Docs yesterday to add a Flow trigger button in a SharePoint list only to find that it doesn't work in web part - very disappointing.

     

    I need to display the list in a page alongside instructions of how to add an item, then send a summary of that item via email (Flow). It's awkward to explain to end users that they can do most of the features from inside a page but then have to go into the list to trigger the button. I will add the same info to the uservoice. 

    • Gareth Jayne's avatar
      Gareth Jayne
      Copper Contributor

      ChrisWebbTech

       

      Thanks for the reply.

       

      The link you posted is what I used when creating my button and I can create one in both a list and library.  The button also shows up when viewing the list/library in a web part on a page but my problem is if I click the button on the web part it does nothing, where if I click it directly in the list or library it fires.

       

      I wondered if it's possible to get a Flow to fire on-demand like this using a list or library web part.  I assume it's not as you don't get the context menu options to do anything with flows in the web parts?

      • ChrisWebbTech's avatar
        ChrisWebbTech
        MVP
        Oh, I see what you mean, so you do get the view to show correctly in the webpart on the page, it just doesn't fire for whatever reason like it does in the view if you go into the library itself? Like you said there must be some context link there in the URL that it uses and probably how it renders the item / URL with the column formatting. Can you paste the section of the button so I can see what the URL it's calling looks like when clicking the button?

Resources