I have a form configured on a sharepoint list item. I have a button inside the form that I would like to trigger a power automate workflow. I have followed the same method referenced in your post here Start a sharepoint workflow from form button - #2 by mnikitina. I have managed to successfully achieve this for a list or library control button, but not on a button control configured in a form on a SP list item. Steps I followed below.
Created power automate workflow: "When an http request is received"
I then get item using the ids in an apply to each. However see attached image. I am always getting this error. This didnt happen on the library or content control button workflows.
The JSON schema doesn't match the schema from the screenshot. The output of the HTTP request is a string, not an array, that is why are getting the error.
How do you trigger the flow? Do you trigger the flow for the items selected in a List or Library control?
Please share the flow settings, make the screenshot of the steps.
Apologies let me explain a little more. I am triggering the flow via a button control in a Sharepoint Form. The form opens after editing a SP List Item. I want to be able to trigger a flow after selecting the button. See screenshots below.
When I select the button, it actually triggers the flow so I believe I have the code in the Click section correct. But something must be wrong in my flow. Flow steps are below. What I am trying to do in the flow is trigger a get item to get the item I am editing and do a bunch of actions after that. Based on the article, once I receive a HTTP request, I can then get item, which will auto configure it into an apply to each. This was the case when I applied this to my list or library control but in this example, its not working in relation to a button.
Is my JSON schema incorrect? This is the JSON I used which I pasted into the sample payload to generate schema.
Thank you. I followed your steps but still am running into an issue. See below configuration.
My on click code for the button. Is this correct?:
Strangely, Im still running into this error in the flow. I pasted your schema above into the sample payload to generate schema and this was the schema it returned. Im not sure why but if I dont do an apply to each I cannot get the item ID. No dynamic content pops up. How do I retrieve the item ID after HTTP request is received?
I pasted the JSON Schema you provided into the "When a HTTP Request is recieved" (use sample payload to generate schema) above and ran the flow by clicking the button. I still am getting this error. The request body JSON schema returns despite pasting your code in:
{