0

I am unable to run a Power Automate flow within my created SharePoint list.

The code which I used seems to be ok, however when I click on the button within SharePoint and try and run my flow I get the following error:

enter image description here

What is more I attach the code which I used for generating my SharePoint button(for "Start The Automate" Column).

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "button",
  "customRowAction": {
    "action": "executeFlow",
    "actionParams": "{\"id\": \"669e6a08-ca95-431f-829b-19232c541a32\"}"
  },
  "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": "Start the Automate"
    }
  ]
}
4
  • Then name of the flow makes me believe that the flow is not a "user triggered" flow but rather one that triggers automatically when you add items to the list, hence you cannot start it manually like you try to do Commented Dec 21, 2021 at 12:47
  • Oh, ok I see your point. So you are basically trying to say that in order to run a flow I would need create a flow without a trigger at the beginning? I have actually tried that with another flow(which is not user triggered) and I was still unable to launch my flow from SharePoint Commented Dec 21, 2021 at 13:17
  • 2
    I will suggest you to use the For a selected item trigger from SharePoint connector. Commented Dec 21, 2021 at 13:50
  • 1
    Great!!! Thanks a lot @GaneshSanap this has solved my problem completely. Now when I try to run my flow it is completely executable. Thanks a lot again. Commented Dec 21, 2021 at 15:00

1 Answer 1

1

As you are trying to run a Power automate flow from SharePoint list using JSON formatting,

I will suggest you to use the For a selected item trigger from SharePoint connector to run the flow instead of "When an item is created" trigger.

Check below documentation for this trigger: For a selected item

Additional Reference: Create a button to launch a Flow

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.