0

I want to manually trigger an external flow from my SPFx project, and at the same time send values to the flow.

In flow, I have my request body:

{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
    "emailaddress": {
        "type": "string"
    },
    "id": {
        "type": "number"
    },
},
"required": [
    "emailaddress",
    "id"
]
 }

I have the unique URL/Path to my flow.

But how do I connect to flow (via this path, or some other possible way) and at the same time send data to it?

I am using JavaScript/react.

1

You can use HttpClient REST call in your SPFx web part to POST the properties to unique URL/Path to your flow.

You can find the detailed article on how to run a Microsoft Flow from a SharePoint Framework (SPFx) web part in below link:

How To: Run a Microsoft Flow from a SharePoint Framework (SPFx) web part.

Also, below is the similar example (Not in SPFx) to trigger Microsoft Flow with a button click using AJAX Call. This will help you to understand how to pass the properties to Microsoft flow:

Trigger A Microsoft Flow With A Button Click On SharePoint Online.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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