cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate I
Advocate I

Manually trigger Flow from SharePoint List item

I need to recreate a workflow that we currently have in SharePoint Designer, in Microsoft Flow. 

Basically, I need to be able to add a link to restore a list item from an archive by clicking a button on the AllItems.aspx list view. When manually triggered, the flow should set the Archive Status field to Active, make a copy in the Active Forms list and then finally delete from the Archived Forms list.

Is this possible? and is there a way I can manually get a link to trigger a flow this way?

 

This is the current workflow in SharePoint DesignerThis is the current workflow in SharePoint DesignerThis is the current list view where the workflow can be manually triggered from the 'Workflow' columnThis is the current list view where the workflow can be manually triggered from the 'Workflow' column

11 REPLIES 11
Highlighted
Dual Super User III
Dual Super User III

Re: Manually trigger Flow from SharePoint List item

Yes, there is Flow Trigger for a selected item in the SharePoint connector. This lets you manually trigger a Flow on a selected item in a SharePoint list.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Highlighted
Advocate I
Advocate I

Re: Manually trigger Flow from SharePoint List item

Thanks @Pstork1 . How would I get the trigger link for this Flow so that I can paste it into the 'Workflow' column of the list?

Highlighted
Dual Super User III
Dual Super User III

Re: Manually trigger Flow from SharePoint List item

You don't need a trigger link.  Once you use that trigger and configure it for a particular list the Flow will show up in the Flow menu by name when you select an item.  You can click on it there to launch the flow.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Highlighted
Advocate I
Advocate I

Re: Manually trigger Flow from SharePoint List item

Thanks @Pstork1.

Whilst I know this is possible, from a user perspective it would be a lot simpler if we coudl just have a link (like the image I attached in the original post) where users can just click 'Restore from Archive' which then triggers the workflow directly from this view.

We have also hiiden the toolbar of the list as we don't want users to create/edit new items from this page.

Highlighted
Dual Super User III
Dual Super User III

Re: Manually trigger Flow from SharePoint List item

The link to the Flow is realatively easy to get.  The problem is the selection is done and passed to the Flow using Javascript.  I'm not sure how you reproduce that in a Link.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Highlighted
Advocate I
Advocate I

Re: Manually trigger Flow from SharePoint List item

I have now created the Flow using the 'For a Selected Item' trigger.

Restore from Archive.PNG

Now I just need to get a link that I can add to the 'Restore from Archive' column of my list so that the Flow can manually be triggered by users by clicking this link.

Any ideas?

 

Highlighted
Super User
Super User

Re: Manually trigger Flow from SharePoint List item

Hi @Sam12 there are two really nice ways in which you can interact with Flow directly from your list or library. Given that you ahve already used a "For a selected item" trigger and associated with with a list, you will already have enabled one. The one caveat is that this will only work for the modern experience.

 

If I select an item i.e. I put a check next to it, I then have the ability to execute the Flow by going to the Flow menu and then selecting your Flow. In the screenshot below, my Flow is called "Selected File Demo".

 

Trigger-Flow01.PNG

 

Alternatively, you could have another column (or an existing one) and apply some conditional formatting to it, and have that as a clickable link. In the following example, I have created a standard text column called Flow. On the column header, I have then selected Format this Column.

 

ConditionalFormatting.PNG

When the formatting blade opens on the right hand side, I have used some JSON to configure the way in which the column is formatted. There are lots of articles out there about column formatting which are worth taking a look.

The JSON which have used is as follows:

{
  "$schema": "http://columnformatting.sharepointpnp.com/columnFormattingSchema.json",
  "elmType": "button",
  "customRowAction": {
    "action": "executeFlow",
    "actionParams": "{\"id\": \"154a59a0-99cf-4815-a39b-73612866043a\"}"
  },
  "style": {
    "border": "none",
    "background-color": "transparent",
    "color": "#0078d7",
    "cursor": "pointer"
  },
  "children": [
    {
      "elmType": "span",
      "attributes": {
        "iconName": "Flow"
      },
      "style": {
        "padding-right": "6px"
      }
    },
    {
      "elmType": "span",
      "txtContent": "Launch Flow"
    }
  ]
}

The string above which is highlighted red is your Flow ID. You can find this by navigating to your Flow summary page, and looking at the URL. You need the string which appears between flows and details e.g.

flows/THIS IS YOUR FLOW ID/details

 

You could apply the above to your restore from archive Flow to get the user experience that you're looking for.





Did my reply help? Please give it a thumbs up.
Did I answer your question? Please mark my post as a solution!
If you liked my response, please consider giving it a thumbs up. THANKS!


Proud to be a Flownaut!





Community Leader: Black Country PowerApps & Flow User Group

Highlighted
Advocate I
Advocate I

Re: Manually trigger Flow from SharePoint List item

Thanks @MattWeston365 - I have changed my list to modern experience. Visually it looks like this has worked however the link doesn't appear to be clickable. 

Flow.PNG

It also doesn't appear to have synced through to the page where I have embedded the list:

Flow 2.PNG

Highlighted
Super User
Super User

Re: Manually trigger Flow from SharePoint List item

Are you seeing your Flow appear as in screenshot 1? If so, does that method work? If that works then we can concentrate on the column formatting. If not, then we have an issue with the Flow so can focus there.





Did my reply help? Please give it a thumbs up.
Did I answer your question? Please mark my post as a solution!
If you liked my response, please consider giving it a thumbs up. THANKS!


Proud to be a Flownaut!





Community Leader: Black Country PowerApps & Flow User Group

Highlighted
Advocate I
Advocate I

Re: Manually trigger Flow from SharePoint List item

I have managed to get the link working now directly in the list (I needed to add myself to the Run Only group).

However, the link disappears when I try to embed the list view to a site page. Any ideas?

Highlighted
Super User
Super User

Re: Manually trigger Flow from SharePoint List item

The start Flow behaviour won't work through the List or Library web parts unfortunately. This is because the web parts lack the interfaces to Flow i.e. you won't have the Flow button on the activity bar. So the only place this can actually start is within the list or library itself.





Did my reply help? Please give it a thumbs up.
Did I answer your question? Please mark my post as a solution!
If you liked my response, please consider giving it a thumbs up. THANKS!


Proud to be a Flownaut!





Community Leader: Black Country PowerApps & Flow User Group

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (5,892)