In addition to the Out-Of-The-Box triggers included in Flow, we also have the chance to invoke a flow using an HTTP POST call. There is a post on the Flow’s blog, “Calling Microsoft Flow from your application” (link), which explains this very weel. I’ll write some of the basic steps of a common scenario.
We need to start from a blank template, the first step we will add will be a trigger of type “Request / Response”.
This type of trigger allows us to define a JSON schema with the fields for our call. Then we can use it in the following step of the Flow. Using jsonschema.net, I will create a simple example with 2 fields: filename and filecontent.
Then we copy the generated schema in the request definition. In the next step, I will create a new file in OneDrive with part of the content of the Request. As we can see in the image below, Flow parser analyzes the schema and presents us with the possibility of using the filename and filecontent fields.
Finally, we add a Response action to complete the flow call. Here we also use the dynamic properties to select Headers and Body. If we want return a custom Body, the dynamic properties can be used to create it.
When we save the Flow definition, in the trigger Request we will find the URL we well use to make the calls. This is the time of copying this URL.
Finally, to emulate calls will use a classic app: Google, Postman Chrome App. Using the URL and the schema JSON make a request and we can see the result of it.
And, if we are to OneDrive, we can see the file created with the content that we have used in the request.
This is a very simple way to create and invoke flows!
Greetings @ Toronto