0

I created a flow from my SharePoint library - Flow -> Create flow.

The flow takes a Word Document template and populates it with input from the user (manually trigger flow). It works, but I can only run it in my Flow Dashboard. Is it any way to trigger this flow inside SharePoint? If the flow can be triggered by a URL then I can attach a button to the URL or something similar.

My flow

1 Answer 1

1

I guess using the Column formatting using JSON is one of the best way to run your flow right from Library view.

You can use column formatting to create buttons that, when selected, run Flows on the corresponding list item. The Flow Launch Panel will be displayed after choosing the button and the Flow will just run.

Source: Create a button to launch a Flow.

Sample Code:

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "button",
  "customRowAction": {
    "action": "executeFlow",
    "actionParams": "{\"id\": \"edf627d9-20f4-45ba-8bc9-4494bf2ff1be\"}"
  },
  "attributes": {
    "class": "ms-fontColor-themePrimary ms-fontColor-themeDarker--hover"
  },
  "style": {
    "border": "none",
    "background-color": "transparent",
    "cursor": "pointer"
  },
  "children": [
    {
      "elmType": "span",
      "attributes": {
        "iconName": "Flow"
      },
      "style": {
        "padding-right": "6px"
      }
    },
    {
      "elmType": "span",
      "txtContent": "It's Flow Time!"
    }
  ]
}

Note: You need to replace the id given in actionParams by the actual ID of your flow. Check above given reference for more details.

2
  • Thank you, its seems to be a solution. I tried it, and entered the ID of the flow. However, I get an error 400 on my post api in the console, and in my flow dashboard i get an "InvokerConnectionOverrideFailed. Failed to parse invoker connections from trigger 'manual' outputs. Exception: Could not find property 'headers.X-MS-APIM-Tokens' in the trigger outputs. Workflow has connection references '["shared_wordonlinebusiness","shared_sharepointonline"]' with invoker runtime source." on my "manually trigger flow". Have you encountered the same?
    – Arte
    Commented Nov 18, 2019 at 14:05
  • Try removing "Manually trigger a flow" trigger and using only last two action. Please accept it as an Answer if it helped you. Commented Dec 13, 2019 at 10:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.